mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 06:15:33 -04:00
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
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Reference in a new issue