Index: sys/net/if_vlan.c =================================================================== --- sys/net/if_vlan.c +++ sys/net/if_vlan.c @@ -570,10 +570,17 @@ VLAN_XLOCK_ASSERT(); + if (ifp->if_flags & IFF_DYING) + return (ENXIO); + /* Find the parent. */ sc = ifp->if_softc; ifp_p = PARENT(sc); + /* check if parent is freed */ + if (ifp_p == NULL) + return (ENXIO); + CURVNET_SET_QUIET(ifp_p->if_vnet); /* First, remove any existing filter entries. */