Fix a panic when leaving MC group in a kernel with VIMAGE enabled.

in_leavegroup() is called from an asynchronous task, and
igmp_change_state() requires that curvnet is set by the caller.
This commit is contained in:
hrs 2013-07-02 16:39:12 +00:00
parent 9906aefa83
commit b3bce89084

View File

@ -1236,7 +1236,9 @@ in_leavegroup_locked(struct in_multi *inm, /*const*/ struct in_mfilter *imf)
KASSERT(error == 0, ("%s: failed to merge inm state", __func__));
CTR1(KTR_IGMPV3, "%s: doing igmp downcall", __func__);
CURVNET_SET(inm->inm_ifp->if_vnet);
error = igmp_change_state(inm);
CURVNET_RESTORE();
if (error)
CTR1(KTR_IGMPV3, "%s: failed igmp downcall", __func__);