summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMobashshera Rasool <mrasool@vmware.com>2022-03-22 10:48:01 -0700
committerMobashshera Rasool <mrasool@vmware.com>2022-03-22 11:05:54 -0700
commit6d0a6ede82d7e02581c4fb9f585239d2358bd45e (patch)
tree482229f84d1a9fa3d1b1062b7e9d8cdc7ce7465c
parent2d07728e79c545e64beede58fdd4c6cf708b92d6 (diff)
pimd: correct prefix-list ssm range update for exclude mode
Modifying the code as per 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. Issue is observed when a group in exclude mode was in ASM range as per the prefix-list and then prefix-list is modified to make it fall under SSM range. The (*,G) entry remains there. So when the group moves to ssm range and it is exclude mode, delete the group from the IGMP table. Co-authored-by: Vishal Dhingra <rac.vishaldhingra@gmail.com> Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
-rw-r--r--pimd/pim_igmp.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index aa6b30c624..57c4cdc470 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -131,12 +131,27 @@ void igmp_source_forward_reevaluate_all(struct pim_instance *pim)
struct listnode *srcnode;
struct gm_source *src;
- /* scan group sources */
- for (ALL_LIST_ELEMENTS_RO(grp->group_source_list,
- srcnode, src)) {
- igmp_source_forward_reevaluate_one(pim, src);
- } /* scan group sources */
- } /* scan igmp groups */
+ /*
+ * 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, grp->group_addr) &&
+ grp->group_filtermode_isexcl) {
+ igmp_group_delete(grp);
+ } else {
+ /* scan group sources */
+ for (ALL_LIST_ELEMENTS_RO(
+ grp->group_source_list, srcnode,
+ src)) {
+ igmp_source_forward_reevaluate_one(pim,
+ src);
+ } /* scan group sources */
+ }
+ } /* scan igmp groups */
RB_FOREACH_SAFE (ch, pim_ifchannel_rb, &pim_ifp->ifchannel_rb,
ch_temp) {