diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-27 12:54:30 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-27 13:28:14 -0400 |
| commit | d3aded9982a2928f98d7b983593bae304efcf268 (patch) | |
| tree | 7413316bf994a8ea0754a2b2970693be66879ace | |
| parent | 82f9fd9646a6798beeafb63e1e818f2d94989aea (diff) | |
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>
| -rw-r--r-- | pimd/pim_mroute.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index f85f422298..4bf490f456 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -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", |
