]> git.proxmox.com Git - mirror_frr.git/commitdiff
pim6d, pimd: Discard (*,G) prune if WC bit is set but RPT bit is unset.
authorMobashshera Rasool <mrasool@vmware.com>
Mon, 21 Nov 2022 11:15:28 +0000 (03:15 -0800)
committerMobashshera Rasool <mrasool@vmware.com>
Tue, 22 Nov 2022 06:00:10 +0000 (22:00 -0800)
As per RFC 7761, Section 4.9.1
The RPT (or Rendezvous Point Tree) bit is a 1-bit value for use
with PIM Join/Prune messages (see Section 4.9.5.1). If the
WC bit is 1, the RPT bit MUST be 1.

ANVL conformance test case is trying to verify this and is failing.

Issue: #12354

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
pimd/pim_join.c

index 7b252ad57244f54f158c2fd6d2cc91d26a260a9c..e028b6aa77a0b7c1bccb9743149289d163f686bd 100644 (file)
@@ -140,8 +140,21 @@ static void recv_prune(struct interface *ifp, struct pim_neighbor *neigh,
 
        ++pim_ifp->pim_ifstat_prune_recv;
 
-       if ((source_flags & PIM_RPT_BIT_MASK)
-           && (source_flags & PIM_WILDCARD_BIT_MASK)) {
+       if (CHECK_FLAG(source_flags, PIM_WILDCARD_BIT_MASK)) {
+               /* As per RFC 7761 Section 4.9.1:
+                * The RPT (or Rendezvous Point Tree) bit is a 1-bit value for
+                * use with PIM Join/Prune messages (see Section 4.9.5.1). If
+                * the WC bit is 1, the RPT bit MUST be 1.
+                */
+               if (!CHECK_FLAG(source_flags, PIM_RPT_BIT_MASK)) {
+                       if (PIM_DEBUG_PIM_J_P)
+                               zlog_debug(
+                                       "Discarding (*,G)=%pSG prune since WC bit is set but RPT bit is unset",
+                                       sg);
+
+                       return;
+               }
+
                /*
                 * RFC 4601 Section 4.5.2:
                 * Received Prune(*,G) messages are processed even if the