summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorMobashshera Rasool <mrasool@vmware.com>2022-11-21 12:10:02 +0100
committerMobashshera Rasool <mrasool@vmware.com>2022-11-22 06:57:39 +0100
commitc6950cb34358181d5830f0c8fdefed590fbe0586 (patch)
treede21c2fc9b4fadf319a608adc7bfc14071c5ce9b /pimd
parentMerge pull request #12336 from cscarpitta/fix/increase-sid-index-limit (diff)
downloadfrr-c6950cb34358181d5830f0c8fdefed590fbe0586.tar.xz
frr-c6950cb34358181d5830f0c8fdefed590fbe0586.zip
pim6d, pimd: Discard (*,G) join 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.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/pimd/pim_join.c b/pimd/pim_join.c
index 8c7ae80d2..7b252ad57 100644
--- a/pimd/pim_join.c
+++ b/pimd/pim_join.c
@@ -72,8 +72,21 @@ static void recv_join(struct interface *ifp, struct pim_neighbor *neigh,
* If the RPT and WC are set it's a (*,G)
* and the source is the RP
*/
- 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 join since WC bit is set but RPT bit is unset",
+ sg);
+
+ return;
+ }
+
struct pim_rpf *rp = RP(pim_ifp->pim, sg->grp);
pim_addr rpf_addr;