diff options
Diffstat (limited to 'sys/nfsclient/bootp_subr.c')
-rw-r--r-- | sys/nfsclient/bootp_subr.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c index cff72c7..9fcd03f 100644 --- a/sys/nfsclient/bootp_subr.c +++ b/sys/nfsclient/bootp_subr.c @@ -584,8 +584,6 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td) int retry; const char *s; - CURVNET_SET(TD_TO_VNET(td)); - /* * Create socket and set its recieve timeout. */ @@ -962,7 +960,6 @@ gotreply: out: soclose(so); out0: - CURVNET_RESTORE(); return error; } @@ -977,8 +974,6 @@ bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx, struct ifaddr *ifa; struct sockaddr_dl *sdl; - CURVNET_SET(TD_TO_VNET(td)); - error = socreate(AF_INET, &ifctx->so, SOCK_DGRAM, 0, td->td_ucred, td); if (error != 0) panic("nfs_boot: socreate, error=%d", error); @@ -1053,8 +1048,6 @@ bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx, ifctx->ireq.ifr_name); ifctx->sdl = sdl; - CURVNET_RESTORE(); - return error; } @@ -1630,6 +1623,7 @@ bootpc_init(void) /* * Find a network interface. */ + CURVNET_SET(TD_TO_VNET(td)); #ifdef BOOTP_WIRED_TO printf("bootpc_init: wired to interface '%s'\n", __XSTRING(BOOTP_WIRED_TO)); @@ -1676,6 +1670,7 @@ bootpc_init(void) ifctx = ifctx->next; } IFNET_RUNLOCK(); + CURVNET_RESTORE(); if (gctx->interfaces == NULL || gctx->interfaces->ifp == NULL) { #ifdef BOOTP_WIRED_TO |