Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109367534
D35098.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
883 B
Referenced Files
None
Subscribers
None
D35098.diff
View Options
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
@@ -1514,6 +1514,7 @@
struct thread *td;
int timeout;
int delay;
+ char *s;
timeout = BOOTP_IFACE_WAIT_TIMEOUT * hz;
delay = hz / 10;
@@ -1527,6 +1528,21 @@
if (nfs_diskless_valid != 0)
return;
+ /*
+ * If "vfs.root.mountfrom" is set and the value is something other
+ * than "nfs:", it means the user doesn't want to mount root via nfs,
+ * there's no reason to continue with bootpc
+ */
+ if ((s = kern_getenv("vfs.root.mountfrom")) != NULL) {
+ if ((strncmp(s, "nfs:", 4)) != 0) {
+ printf("%s: vfs.root.mountfrom set to %s. "
+ "BOOTP aborted.\n", __func__, s);
+ freeenv(s);
+ return;
+ }
+ freeenv(s);
+ }
+
gctx = malloc(sizeof(*gctx), M_TEMP, M_WAITOK | M_ZERO);
STAILQ_INIT(&gctx->interfaces);
gctx->xid = ~0xFFFF;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 5, 3:42 AM (21 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16466389
Default Alt Text
D35098.diff (883 B)
Attached To
Mode
D35098: nfs: skip bootpc when vfs.root.mountfrom is other than nfs
Attached
Detach File
Event Timeline
Log In to Comment