]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Do not create PIM state for invalid (S,G)
authorMobashshera Rasool <mrasool@vmware.com>
Mon, 28 Mar 2022 10:09:58 +0000 (03:09 -0700)
committerMobashshera Rasool <mrasool@vmware.com>
Tue, 29 Mar 2022 05:45:28 +0000 (22:45 -0700)
Currently FRR creates an (S,G) PIM state when an IGMPv3
(S,G) join with INCLUDE mode is received for the ASM group.

Since it is an ASM group, we should not create (S,G) PIM state
and should not be sending PIM (S,G) joins towards the source.

This is a misconfiguration. So keep this group in IGMP table
and do not create PIM state.

Issue: #10128
Co-authored-by: Vishal Dhingra <rac.vishaldhingra@gmail.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
pimd/pim_igmp.c

index 57c4cdc470b2b95c09f09e14b8a332b63f85b386..c296439f126ccf071908293d3f7d54495dfe5938 100644 (file)
@@ -179,6 +179,18 @@ void igmp_source_forward_start(struct pim_instance *pim,
                           IGMP_SOURCE_TEST_FORWARDING(source->source_flags));
        }
 
+       /*
+        * PIM state should not be allowed for ASM group with valid source
+        * address.
+        */
+       if ((!pim_is_grp_ssm(pim, source->source_group->group_addr)) &&
+           !pim_addr_is_any(source->source_addr)) {
+               zlog_warn(
+                       "%s: (S,G)=%pSG ASM range having source address, not allowed to create PIM state",
+                       __func__, &sg);
+               return;
+       }
+
        /* Prevent IGMP interface from installing multicast route multiple
           times */
        if (IGMP_SOURCE_TEST_FORWARDING(source->source_flags)) {