|
Description
|
The ip_delmulti() and ip_delmulti_v6() functions contain the following bits of code executed when leaving the "allmulti" group:
/*
* If we never joined, then don't leave. This can happen
* if we're in an IPMP group, since only one ill per IPMP
* group receives all multicast packets.
*/
if (!ill->ill_join_allmulti) {
ASSERT(ill->ill_group != NULL);
return (0);
}
ret = ip_leave_allmulti(ipif);
While it is true that we shouldn't leave the allmulti group if we never joined it, the premise that this can only happen for IPMP is wrong. ip_join_allmulti() will in fact not join the allmulti group if the datalink isn't "up" at the time of the join:
if (!ill->ill_dl_up) {
/*
* Nobody there. All multicast addresses will be re-joined
* when we get the DL_BIND_ACK bringing the interface up.
*/
return (0);
}
As a result, if the application attempts to join and leave the allmulti group before ill_dl_up is B_TRUE, this ASSERT() will get tripped up. This will _always_ be the case for the lo0 interface, for example, for which ill_dl_up is always B_FALSE.
|