diff options
Diffstat (limited to 'sys/net/if_loop.c')
-rw-r--r-- | sys/net/if_loop.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index ba49d76..ab5bda7 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -105,6 +105,9 @@ IFC_SIMPLE_DECLARE(lo, 1); static void lo_clone_destroy(struct ifnet *ifp) { +#ifdef INVARIANTS + INIT_VNET_NET(ifp->if_vnet); +#endif /* XXX: destroying lo0 will lead to panics. */ KASSERT(V_loif != ifp, ("%s: destroying lo0", __func__)); @@ -141,6 +144,7 @@ lo_clone_create(struct if_clone *ifc, int unit, caddr_t params) static int loop_modevent(module_t mod, int type, void *data) { + INIT_VNET_NET(curvnet); switch (type) { case MOD_LOAD: |