summaryrefslogtreecommitdiff
path: root/pimd/pim_join.c
diff options
context:
space:
mode:
authorsaravanank <saravanank@vmware.com>2020-03-17 02:28:18 -0700
committersaravanank <saravanank@vmware.com>2020-03-17 02:32:21 -0700
commit5c777da81f64ad892f0fde969d7e7bc099d36be8 (patch)
tree242ea22883ced4989d0178b86504ad2922c90cbb /pimd/pim_join.c
parent7f2ccbe562cae49fb8bf1770a0ec79b701ee41af (diff)
pimd: (*, G) Prune should be processed even if the RP in packet is not RP(G)
RCA: We are ignoring (*,G) prune when the RP in packet is not RP(G) Fix: According to RFC 4601 Section 4.5.2: Received Prune(*,G) messages are processed even if the RP in the message does not match RP(G). We have allowed starg prune to be processed in the scenario. Signed-off-by: Saravanan K <saravanank@vmware.com>
Diffstat (limited to 'pimd/pim_join.c')
-rw-r--r--pimd/pim_join.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/pimd/pim_join.c b/pimd/pim_join.c
index 62bd2360c3..3a88de2070 100644
--- a/pimd/pim_join.c
+++ b/pimd/pim_join.c
@@ -140,18 +140,19 @@ static void recv_prune(struct interface *ifp, struct pim_neighbor *neigh,
if ((source_flags & PIM_RPT_BIT_MASK)
&& (source_flags & PIM_WILDCARD_BIT_MASK)) {
- struct pim_rpf *rp = RP(pim_ifp->pim, sg->grp);
+ /*
+ * RFC 4601 Section 4.5.2:
+ * Received Prune(*,G) messages are processed even if the
+ * RP in the message does not match RP(G).
+ */
+ if (PIM_DEBUG_PIM_TRACE) {
+ char received_rp[INET_ADDRSTRLEN];
- if (!rp) {
- if (PIM_DEBUG_PIM_TRACE)
- zlog_debug(
- "%s: RP for %pSG4 completely failed lookup",
- __func__, sg);
- return;
+ pim_inet4_dump("<received?>", sg->src, received_rp,
+ sizeof(received_rp));
+ zlog_debug("%s: Prune received with RP(%s) for %pSG4",
+ __func__, received_rp, sg);
}
- // Ignoring Prune *,G's at the moment.
- if (sg->src.s_addr != rp->rpf_addr.u.prefix4.s_addr)
- return;
sg->src.s_addr = INADDR_ANY;
}