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) {