]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: IGMP groups are not getting timeout
authorSai Gomathi <nsaigomathi@vmware.com>
Wed, 18 Aug 2021 08:28:28 +0000 (01:28 -0700)
committerSai Gomathi <nsaigomathi@vmware.com>
Tue, 24 Aug 2021 05:25:30 +0000 (22:25 -0700)
Problem :
=======
When all the groups from Ixia are stopped,
groups still keep refreshing and not getting timeout

RCA:
====
IGMP Report is coming in include mode without any source address, this problem will come.

Fix :
===
If the requested filter mode is INCLUDE *and* the requested
source list is empty, then the entry corresponding to the
requested interface and multicast address is deleted if present.
If no such entry is present, the request is ignored.

When an interface receives the IGMP report without any source, then the group is deleted.

Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
pimd/pim_igmpv3.c

index afa2db5f151d2aee63ba7324efe6787a78c58e3a..572d3a6abaff166d6421accfd552344a21b41694 100644 (file)
@@ -499,6 +499,21 @@ static void allow(struct igmp_sock *igmp, struct in_addr from,
        struct igmp_group *group;
        int i;
 
+       if (num_sources == 0) {
+               /*
+                 RFC 3376: 3.1. Socket-State
+                 If the requested filter mode is INCLUDE *and* the requested
+                 source list is empty, then the entry corresponding to the
+                 requested interface and multicast address is deleted if
+                 present. If no such entry is present, the request is ignored.
+                 So, deleting the group present.
+               */
+               group = find_group_by_addr(igmp, group_addr);
+               if (group && (group->group_filtermode_isexcl == 0))
+                       igmp_group_delete(group);
+               return;
+       }
+
        /* non-existant group is created as INCLUDE {empty} */
        group = igmp_add_group_by_addr(igmp, group_addr);
        if (!group) {