Skip to content
Permalink
Browse files

pimd: There is no reason a IGMP src should need a neighbor

There is no reason that a IGMP src should need a upstream
pim neighbor when doing a RPF lookup.

Ticket: CM-21599
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
  • Loading branch information...
donaldsharp committed Jul 6, 2018
1 parent 76f17a8 commit 57695eb6efb3520249aaa05ce653b119f53a9316
Showing with 11 additions and 12 deletions.
  1. +11 −12 pimd/pim_rpf.c
@@ -203,6 +203,7 @@ enum pim_rpf_result pim_rpf_update(struct pim_instance *pim,
struct prefix nht_p;
struct pim_nexthop_cache pnc;
struct prefix src, grp;
bool neigh_needed = true;

saved.source_nexthop = rpf->source_nexthop;
saved.rpf_addr = rpf->rpf_addr;
@@ -226,23 +227,21 @@ enum pim_rpf_result pim_rpf_update(struct pim_instance *pim,
grp.prefixlen = IPV4_MAX_BITLEN;
grp.u.prefix4 = up->sg.grp;
memset(&pnc, 0, sizeof(struct pim_nexthop_cache));

if ((up->sg.src.s_addr == INADDR_ANY && I_am_RP(pim, up->sg.grp)) ||
PIM_UPSTREAM_FLAG_TEST_FHR(up->flags))
neigh_needed = FALSE;
if (pim_find_or_track_nexthop(pim, &nht_p, up, NULL, &pnc)) {
if (pnc.nexthop_num) {
if (!pim_ecmp_nexthop_search(
pim, &pnc, &up->rpf.source_nexthop, &src,
&grp,
!PIM_UPSTREAM_FLAG_TEST_FHR(up->flags)
&& !PIM_UPSTREAM_FLAG_TEST_SRC_IGMP(
up->flags)))
if (!pim_ecmp_nexthop_search(pim, &pnc,
&up->rpf.source_nexthop,
&src, &grp, neigh_needed))
return PIM_RPF_FAILURE;
}
} else {
if (!pim_ecmp_nexthop_lookup(
pim, &rpf->source_nexthop, up->upstream_addr, &src,
&grp,
!PIM_UPSTREAM_FLAG_TEST_FHR(up->flags)
&& !PIM_UPSTREAM_FLAG_TEST_SRC_IGMP(
up->flags)))
if (!pim_ecmp_nexthop_lookup(pim, &rpf->source_nexthop,
up->upstream_addr, &src,
&grp, neigh_needed))
return PIM_RPF_FAILURE;
}

0 comments on commit 57695eb

Please sign in to comment.
You can’t perform that action at this time.