Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if.c
Show First 20 Lines • Show All 1,303 Lines • ▼ Show 20 Lines | if_vmove(struct ifnet *ifp, struct vnet *new_vnet) | ||||
/* | /* | ||||
* Perform interface-specific reassignment tasks, if provided by | * Perform interface-specific reassignment tasks, if provided by | ||||
* the driver. | * the driver. | ||||
*/ | */ | ||||
if (ifp->if_reassign != NULL) | if (ifp->if_reassign != NULL) | ||||
ifp->if_reassign(ifp, new_vnet, NULL); | ifp->if_reassign(ifp, new_vnet, NULL); | ||||
/* Don't re-attach DYING interfaces. */ | |||||
if (ifp->if_flags & IFF_DYING) | |||||
return; | |||||
/* | /* | ||||
* Switch to the context of the target vnet. | * Switch to the context of the target vnet. | ||||
*/ | */ | ||||
CURVNET_SET_QUIET(new_vnet); | CURVNET_SET_QUIET(new_vnet); | ||||
restart: | restart: | ||||
IFNET_WLOCK(); | IFNET_WLOCK(); | ||||
ifp->if_index = ifindex_alloc(&old); | ifp->if_index = ifindex_alloc(&old); | ||||
if (__predict_false(ifp->if_index == USHRT_MAX)) { | if (__predict_false(ifp->if_index == USHRT_MAX)) { | ||||
▲ Show 20 Lines • Show All 3,290 Lines • Show Last 20 Lines |