mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 02:06:12 +00:00
pimd: Allow (*,G) to work properly.
When the kernel looks up a *,G route it expects the incoming interface to be part of the outgoing interface ttl list. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
82f9fd9646
commit
d3aded9982
@ -524,6 +524,7 @@ int pim_mroute_del_vif(int vif_index)
|
||||
int pim_mroute_add(struct mfcctl *mc)
|
||||
{
|
||||
int err;
|
||||
int orig;
|
||||
|
||||
qpim_mroute_add_last = pim_time_monotonic_sec();
|
||||
++qpim_mroute_add_events;
|
||||
@ -534,8 +535,22 @@ int pim_mroute_add(struct mfcctl *mc)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* The linux kernel *expects* the incoming
|
||||
* vif to be part of the outgoing list
|
||||
* in the case of a (*,G).
|
||||
*/
|
||||
if (mc->mfcc_origin.s_addr == INADDR_ANY)
|
||||
{
|
||||
orig = mc->mfcc_ttls[mc->mfcc_parent];
|
||||
mc->mfcc_ttls[mc->mfcc_parent] = 1;
|
||||
}
|
||||
|
||||
err = setsockopt(qpim_mroute_socket_fd, IPPROTO_IP, MRT_ADD_MFC,
|
||||
mc, sizeof(*mc));
|
||||
|
||||
if (mc->mfcc_origin.s_addr == INADDR_ANY)
|
||||
mc->mfcc_ttls[mc->mfcc_parent] = orig;
|
||||
|
||||
if (err) {
|
||||
int e = errno;
|
||||
zlog_warn("%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_ADD_MFC): errno=%d: %s",
|
||||
|
Loading…
Reference in New Issue
Block a user