xen/netfront: Ensure curvnet is set

netfront_backend_changed() is called from the xenwatch_thread(), which means
that the curvnet is not set. We have to set it before we can call things like
arp_ifinit().

PR:		230845
This commit is contained in:
Kristof Provost 2018-08-23 16:52:52 +00:00
parent 0d7bee6a2a
commit 903eaa68f1

View File

@ -962,6 +962,8 @@ netfront_backend_changed(device_t dev, XenbusState newstate)
DPRINTK("newstate=%d\n", newstate);
CURVNET_SET(sc->xn_ifp->if_vnet);
switch (newstate) {
case XenbusStateInitialising:
case XenbusStateInitialised:
@ -994,6 +996,8 @@ netfront_backend_changed(device_t dev, XenbusState newstate)
#endif
break;
}
CURVNET_RESTORE();
}
/**