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:
parent
0d7bee6a2a
commit
903eaa68f1
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user