SA found these two issues:
1) Check of ifp non-null caused other non-checks down code
to assume ifp could be null. This is not the case.
If we get a callback at this point we must have a valid ifp pointer.
2) We were inadvertently calling igmp_source_reset_gmi with
a possible NULL source pointer.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
struct in_addr star = { .s_addr = INADDR_ANY };
source = igmp_find_source_by_addr (group, star);
if (source)
- IGMP_SOURCE_DONT_DELETE(source->source_flags);
- igmp_source_reset_gmi (group->group_igmp_sock, group, source);
+ {
+ IGMP_SOURCE_DONT_DELETE(source->source_flags);
+ igmp_source_reset_gmi (group->group_igmp_sock, group, source);
+ }
}
/* E.5: delete all sources marked with deletion flag: (X-A) and (Y-A) */
fd,
src_str,
grp_str,
- ifp ? ifp->name : "<ifname?>",
+ ifp->name,
msg->im_vif);
}