mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 06:03:10 +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 pim_mroute_add(struct mfcctl *mc)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
int orig;
|
||||||
|
|
||||||
qpim_mroute_add_last = pim_time_monotonic_sec();
|
qpim_mroute_add_last = pim_time_monotonic_sec();
|
||||||
++qpim_mroute_add_events;
|
++qpim_mroute_add_events;
|
||||||
@ -534,8 +535,22 @@ int pim_mroute_add(struct mfcctl *mc)
|
|||||||
return -1;
|
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,
|
err = setsockopt(qpim_mroute_socket_fd, IPPROTO_IP, MRT_ADD_MFC,
|
||||||
mc, sizeof(*mc));
|
mc, sizeof(*mc));
|
||||||
|
|
||||||
|
if (mc->mfcc_origin.s_addr == INADDR_ANY)
|
||||||
|
mc->mfcc_ttls[mc->mfcc_parent] = orig;
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
int e = errno;
|
int e = errno;
|
||||||
zlog_warn("%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_ADD_MFC): errno=%d: %s",
|
zlog_warn("%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_ADD_MFC): errno=%d: %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user