summaryrefslogtreecommitdiffstats
path: root/pimd/pim_rpf.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-03-16 16:15:32 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-03-16 23:59:13 +0100
commitce2b6ce0984a6a0c7dbfccafeb1b440128f5c878 (patch)
tree37c8e0c77c3b3fd311dcc46c599f177b616f3ce4 /pimd/pim_rpf.c
parentpimd: Cleanup JP Agg a bit more (diff)
downloadfrr-ce2b6ce0984a6a0c7dbfccafeb1b440128f5c878.tar.xz
frr-ce2b6ce0984a6a0c7dbfccafeb1b440128f5c878.zip
pimd: Consider interface change a RPF_CHANGED event
Suppose you have a unnumbered ecmp connections between two switches: st1-l3# show ip pim neighbor Interface Neighbor Uptime Holdtime DR Pri swp52 6.0.0.10 00:00:01 00:00:29 1 swp53 6.0.0.10 00:00:06 00:00:26 1 And for a given (S,G) the RPF goes: st1-l3# show ip nht 99.1.1.1 resolved via bgp fe80::4e76:25ff:fee7:42d1, via swp52 fe80::4e76:25ff:fee7:42d5, via swp53 Client list: pim(fd 14) Now suppose, 52 is the choosen RPF( since we can only pick one ) and the interface goes down. As such we will choose to use swp53. The problem was that the pim_rpf_update call is made it will change the rpf interface to 53, but not tell the calling function that the RPF_CHANGED because it is only looking at the rpf_addr(the nexthop) to see if it is changed and if we are in an unnumbered dual ecmp to the same box it was not detecting and notifying. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_rpf.c')
-rw-r--r--pimd/pim_rpf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pimd/pim_rpf.c b/pimd/pim_rpf.c
index 3d278f12a..180586a78 100644
--- a/pimd/pim_rpf.c
+++ b/pimd/pim_rpf.c
@@ -263,7 +263,9 @@ enum pim_rpf_result pim_rpf_update(struct pim_upstream *up, struct pim_rpf *old,
}
/* detect change in RPF'(S,G) */
- if (saved.rpf_addr.u.prefix4.s_addr != rpf->rpf_addr.u.prefix4.s_addr) {
+ if (saved.rpf_addr.u.prefix4.s_addr != rpf->rpf_addr.u.prefix4.s_addr ||
+ saved.source_nexthop.interface != rpf->source_nexthop.interface)
+ {
/* return old rpf to caller ? */
if (old)