diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c --- a/sys/nfs/bootp_subr.c +++ b/sys/nfs/bootp_subr.c @@ -1501,7 +1501,7 @@ void bootpc_init(void) { - struct bootpc_ifcontext *ifctx; /* Interface BOOTP contexts */ + struct bootpc_ifcontext *ifctx = NULL; /* Interface BOOTP contexts */ struct bootpc_globalcontext *gctx; /* Global BOOTP context */ struct ifnet *ifp; struct sockaddr_dl *sdl; @@ -1571,9 +1571,13 @@ } ifcnt++; } + IFNET_RUNLOCK(); - if (ifcnt == 0) - panic("%s: no eligible interfaces", __func__); + if (ifcnt == 0) { + printf("WARNING: BOOTP found no eligible network interfaces, skipping!\n"); + goto out; + } + for (; ifcnt > 0; ifcnt--) allocifctx(gctx); #endif