]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: correct prefix-list ssm range update for exclude mode 10844/head
authorMobashshera Rasool <mrasool@vmware.com>
Tue, 22 Mar 2022 17:48:01 +0000 (10:48 -0700)
committerMobashshera Rasool <mrasool@vmware.com>
Tue, 22 Mar 2022 18:05:54 +0000 (11:05 -0700)
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>
pimd/pim_igmp.c

index aa6b30c6240595f9c37e6a737853b4447a8ec962..57c4cdc470b2b95c09f09e14b8a332b63f85b386 100644 (file)
@@ -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) {