diff options
author | Mobashshera Rasool <mrasool@vmware.com> | 2022-11-21 12:15:28 +0100 |
---|---|---|
committer | Mobashshera Rasool <mrasool@vmware.com> | 2022-11-22 07:00:10 +0100 |
commit | a23a485cbff96fc3cfca50a309977fd5dea06639 (patch) | |
tree | 141ef20a27b4deb56ccc39d755b4abca75343d41 /pimd | |
parent | pim6d, pimd: Discard (*,G) join if WC bit is set but RPT bit is unset. (diff) | |
download | frr-a23a485cbff96fc3cfca50a309977fd5dea06639.tar.xz frr-a23a485cbff96fc3cfca50a309977fd5dea06639.zip |
pim6d, pimd: Discard (*,G) prune if WC bit is set but RPT bit is unset.
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>
Diffstat (limited to 'pimd')
-rw-r--r-- | pimd/pim_join.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/pimd/pim_join.c b/pimd/pim_join.c index 7b252ad57..e028b6aa7 100644 --- a/pimd/pim_join.c +++ b/pimd/pim_join.c @@ -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 |