From: Jafar Al-Gharaibeh Date: Fri, 6 Sep 2024 14:57:53 +0000 (-0500) Subject: pimd: make sure the bsr message is coming from the neighbor X-Git-Tag: base_10.2~93^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=569b1d41df0456847fab90bf411d74520be4de69;p=matthieu%2Ffrr.git pimd: make sure the bsr message is coming from the neighbor This change re-adds an additional check bsr rpf that was removed in 2c6a32f9be3c687fe5c52d055f21912da8364ec6. Without that check, bsr messages is resent (causing a loop) if we have more than one pim neighbor on a link. Signed-off-by: Jafar Al-Gharaibeh --- diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index 57dcff3b47..030b933e09 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -343,7 +343,8 @@ bool pim_nht_bsr_rpf_check(struct pim_instance *pim, pim_addr bsr_addr, if (!nbr) continue; - return znh->ifindex == src_ifp->ifindex; + return znh->ifindex == src_ifp->ifindex && + (!pim_addr_cmp(znh->nexthop_addr, src_ip)); } return false; } @@ -404,13 +405,12 @@ bool pim_nht_bsr_rpf_check(struct pim_instance *pim, pim_addr bsr_addr, return true; /* MRIB (IGP) may be pointing at a router where PIM is down */ - nbr = pim_neighbor_find(ifp, nhaddr, true); - if (!nbr) continue; - return nh->ifindex == src_ifp->ifindex; + return nh->ifindex == src_ifp->ifindex && + (!pim_addr_cmp(nhaddr, src_ip)); } return false; }