pimd: Skip nexthop lookup for register source in some cases

There exists the possibility that a RP exists as a anycast
pair for a lan segment.  As such one side may receive
the register and properly handle the registration mechanics.
The one that does not receive the register packets will still
get S,G state and WRVIFWHOLE upcalls across the lan.  In
this case notice that we have not received the Registration
packets and prevent nexthop lookups.

Ticket: CM-27466
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2019-11-22 16:16:26 -05:00
parent 17823cdd2c
commit aeb672466f

View File

@ -505,8 +505,17 @@ static int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp,
* the pimreg period, so I believe we can ignore this packet
*/
if (!PIM_UPSTREAM_FLAG_TEST_FHR(up->flags)) {
// No if channel, but upstream we are at the RP.
if (pim_nexthop_lookup(pim_ifp->pim, &source,
/*
* No if channel, but upstream we are at the RP.
*
* This could be a anycast RP too and we may
* not have received a register packet from
* the source here at all. So gracefully
* bow out of doing a nexthop lookup and
* setting the SPTBIT to true
*/
if (up->upstream_register.s_addr != INADDR_ANY &&
pim_nexthop_lookup(pim_ifp->pim, &source,
up->upstream_register, 0)) {
pim_register_stop_send(source.interface, &sg,
pim_ifp->primary_address,