diff options
| author | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-07-28 02:46:36 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-21 20:26:04 -0500 |
| commit | 035f28f683f1c0fd581dc37011f059cf68c76324 (patch) | |
| tree | cd4423bae489e634a7f5146dc63d500a838de369 /pimd/pim_join.c | |
| parent | 31c680fc88838cd7e0be8bf12165084d4cb03b52 (diff) | |
pimd: Fix *,g pruning
We were not properly handling the receipt of prune *,g messages.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_join.c')
| -rw-r--r-- | pimd/pim_join.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/pimd/pim_join.c b/pimd/pim_join.c index 732dd823ad..09af3f1ab3 100644 --- a/pimd/pim_join.c +++ b/pimd/pim_join.c @@ -99,7 +99,7 @@ static void recv_join(struct interface *ifp, pim_ifchannel_join_add(ifp, neigh->source_addr, upstream, &sg, source_flags, holdtime); - if (I_am_RP (group) && source.s_addr == INADDR_ANY) + if (I_am_RP (group) && sg.u.sg.src.s_addr == INADDR_ANY) { struct pim_upstream *up; @@ -145,10 +145,22 @@ static void recv_prune(struct interface *ifp, source_flags & PIM_WILDCARD_BIT_MASK, up_str, holdtime, neigh_str, ifp->name); } + + if ((source_flags & PIM_RPT_BIT_MASK) && + (source_flags & PIM_WILDCARD_BIT_MASK)) + { + struct pim_rpf *rp = RP (sg.u.sg.grp); + + // Ignoring Prune *,G's at the moment. + if (sg.u.sg.src.s_addr != rp->rpf_addr.s_addr) + return; + + sg.u.sg.src.s_addr = INADDR_ANY; + } pim_ifchannel_prune(ifp, upstream, &sg, source_flags, holdtime); - if (I_am_RP (group) && source.s_addr == INADDR_ANY) + if (I_am_RP (group) && sg.u.sg.src.s_addr == INADDR_ANY) { struct pim_upstream *up; |
