summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index c1c6ee9..c387dbf 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -956,12 +956,21 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet)
*/
IFNET_WLOCK();
ifindex_free_locked(ifp->if_index);
+ IFNET_WUNLOCK();
+
+ /*
+ * Perform interface-specific reassignment tasks, if provided by
+ * the driver.
+ */
+ if (ifp->if_reassign != NULL)
+ ifp->if_reassign(ifp, new_vnet, NULL);
/*
* Switch to the context of the target vnet.
*/
CURVNET_SET_QUIET(new_vnet);
+ IFNET_WLOCK();
if (ifindex_alloc_locked(&idx) != 0) {
IFNET_WUNLOCK();
panic("if_index overflow");
OpenPOWER on IntegriCloud