summaryrefslogtreecommitdiffstats
path: root/pimd/pim_rpf.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-09-15 22:50:08 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-22 02:26:10 +0100
commit4a40c37aa4d4a4480e992bfa5b3e9234abc90c61 (patch)
tree7f9bb8abffb1eb0fc24ccf2a4003fc59f237e9b2 /pimd/pim_rpf.c
parentpimd: Add debug messages as to why a register packet is rejected. (diff)
downloadfrr-4a40c37aa4d4a4480e992bfa5b3e9234abc90c61.tar.xz
frr-4a40c37aa4d4a4480e992bfa5b3e9234abc90c61.zip
pimd: Further work to fix rpf lookups and nbrs
When we do a RPF lookup return a path that we have neighbors for in those cases where we need to have a neighbor to pass along the SG state via a pim join/prune message. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_rpf.c')
-rw-r--r--pimd/pim_rpf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pimd/pim_rpf.c b/pimd/pim_rpf.c
index 3d88f9e70..46a6ef1ca 100644
--- a/pimd/pim_rpf.c
+++ b/pimd/pim_rpf.c
@@ -46,7 +46,6 @@ int pim_nexthop_lookup(struct pim_nexthop *nexthop, struct in_addr addr, int nei
int found = 0;
int i = 0;
- neighbor_needed = 0;
memset (nexthop_tab, 0, sizeof (struct pim_zlookup_nexthop) * MULTIPATH_NUM);
num_ifindex = zclient_lookup_nexthop(nexthop_tab,
MULTIPATH_NUM,
@@ -87,7 +86,7 @@ int pim_nexthop_lookup(struct pim_nexthop *nexthop, struct in_addr addr, int nei
ifp->name, first_ifindex, addr_str);
}
- if (neighbor_needed)
+ if (neighbor_needed && !pim_if_connected_to_source (ifp, addr))
{
struct pim_neighbor *nbr;
@@ -148,7 +147,9 @@ enum pim_rpf_result pim_rpf_update(struct pim_upstream *up, struct in_addr *old_
save_rpf_addr = rpf->rpf_addr; /* detect change in RPF'(S,G) */
if (pim_nexthop_lookup(&rpf->source_nexthop,
- up->upstream_addr, !PIM_UPSTREAM_FLAG_TEST_FHR (up->flags))) {
+ up->upstream_addr,
+ !PIM_UPSTREAM_FLAG_TEST_FHR (up->flags) &&
+ !PIM_UPSTREAM_FLAG_TEST_SRC_IGMP (up->flags))) {
return PIM_RPF_FAILURE;
}