summaryrefslogtreecommitdiff
path: root/pimd/pim_igmpv2.c
diff options
context:
space:
mode:
authorAbhishek N R <abnr@vmware.com>2021-11-09 03:18:43 -0800
committerAbhishek N R <abnr@vmware.com>2022-01-20 07:52:17 -0800
commitd6f31d2ab3e72e4dd70b998017660618bab4f3a3 (patch)
tree326c748e6c16900c8974d34ee897ddf03e7ee63d /pimd/pim_igmpv2.c
parentf6053ff29dd8635fadeff064a1944cdf15509720 (diff)
pimd : Handling of IGMPv2 report message for SSM aware group range.
Problem Statement: ================== (rcv1)-----A----B---C v3 enabled with src 90.0.0.1 | (rcv2)-- v2 enable with src none rcv1 sends the packet in INCLUDE mode, rcv2 sends the IGMPv2 report and PIM convers this report into exclude mode. As per the state machine the group structure was getting added and deleted. As group gets deleted the mroute for 90.0.0.1 and recreated back. This effects the end to end trafiic. Root Cause Analysis: ==================== As per state machine INCLUDE (A) IS_EX (B) EXCLUDE (A*B,B-A) (B-A)=0 Delete (A-B) Group Timer=GMI EXCLUDE (X,Y) TO_EX (A) EXCLUDE (A-Y,Y*A) (A-X-Y)=Group Timer Delete (X-A) Delete (Y-A) Send Q(G,A-Y) Group Timer=GMI The above equations were getiing calulated for IP address 90.0.0.1 and 0.0.0.0 This results in group creation deletion. Fix: ==== As per RFC 4604. drop the exclude mode, IGMP reports, if destnation group is SSM based. EXCLUDE mode does not apply to SSM addresses, and an SSM-aware router will ignore MODE_IS_EXCLUDE and CHANGE_TO_EXCLUDE_MODE requests in the SSM range, Signed-off-by: Abhishek N R <abnr@vmware.com> Signed-off-by: Vishal Dhingra <rac.vishaldhingra@gmail.com>
Diffstat (limited to 'pimd/pim_igmpv2.c')
-rw-r--r--pimd/pim_igmpv2.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/pimd/pim_igmpv2.c b/pimd/pim_igmpv2.c
index a7c7c99ebf..81a895ee7c 100644
--- a/pimd/pim_igmpv2.c
+++ b/pimd/pim_igmpv2.c
@@ -24,6 +24,7 @@
#include "pim_igmp.h"
#include "pim_igmpv2.h"
#include "pim_igmpv3.h"
+#include "pim_ssm.h"
#include "pim_str.h"
#include "pim_time.h"
#include "pim_util.h"
@@ -107,10 +108,13 @@ int igmp_v2_recv_report(struct gm_sock *igmp, struct in_addr from,
{
struct interface *ifp = igmp->interface;
struct in_addr group_addr;
+ struct pim_interface *pim_ifp;
char group_str[INET_ADDRSTRLEN];
on_trace(__func__, igmp->interface, from);
+ pim_ifp = ifp->info;
+
if (igmp->mtrace_only)
return 0;
@@ -142,6 +146,23 @@ int igmp_v2_recv_report(struct gm_sock *igmp, struct in_addr from,
}
/*
+ * RFC 4604
+ * section 2.2.1
+ * EXCLUDE mode does not apply to SSM addresses, and an SSM-aware router
+ * will ignore MODE_IS_EXCLUDE and CHANGE_TO_EXCLUDE_MODE requests in
+ * the SSM range.
+ */
+ if (pim_is_grp_ssm(pim_ifp->pim, group_addr)) {
+ if (PIM_DEBUG_IGMP_PACKETS) {
+ zlog_debug(
+ "Ignoring IGMPv2 group record %pI4 from %s on %s exclude mode in SSM range",
+ &group_addr.s_addr, from_str, ifp->name);
+ }
+ return -1;
+ }
+
+
+ /*
* RFC 3376
* 7.3.2. In the Presence of Older Version Group Members
*