static void group_timer_off(struct igmp_group *group);
-static struct igmp_group *find_group_by_addr(struct igmp_sock *igmp,
- struct in_addr group_addr);
-
static int igmp_sock_open(struct in_addr ifaddr, int ifindex, uint32_t pim_options)
{
int fd;
group, interval_msec);
}
-static struct igmp_group *find_group_by_addr(struct igmp_sock *igmp,
- struct in_addr group_addr)
+struct igmp_group *
+find_group_by_addr (struct igmp_sock *igmp,
+ struct in_addr group_addr)
{
struct igmp_group *group;
struct listnode *node;
int64_t last_igmp_v2_report_dsec;
};
+struct igmp_group *find_group_by_addr (struct igmp_sock *igmp,
+ struct in_addr group_addr);
struct igmp_group *igmp_add_group_by_addr(struct igmp_sock *igmp,
struct in_addr group_addr);
on_trace(__PRETTY_FUNCTION__,
ifp, from, group_addr, num_sources, sources);
- /* non-existant group is created as INCLUDE {empty} */
- group = igmp_add_group_by_addr(igmp, group_addr);
- if (!group) {
- return;
- }
+ /*
+ * 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.
+ */
+ if (num_sources)
+ {
+ /* non-existant group is created as INCLUDE {empty} */
+ group = igmp_add_group_by_addr(igmp, group_addr);
+ if (!group) {
+ return;
+ }
+ }
+ else
+ {
+ group = find_group_by_addr (igmp, group_addr);
+ if (!group)
+ return;
+ }
if (group->group_filtermode_isexcl) {
/* EXCLUDE mode */