Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151220771
D17171.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
601 B
Referenced Files
None
Subscribers
None
D17171.diff
View Options
Index: head/sbin/ifconfig/ifconfig.c
===================================================================
--- head/sbin/ifconfig/ifconfig.c
+++ head/sbin/ifconfig/ifconfig.c
@@ -504,6 +504,18 @@
}
#endif
errx(1, "interface %s does not exist", ifname);
+ } else {
+ /*
+ * Do not allow use `create` command as hostname if
+ * address family is not specified.
+ */
+ if (argc > 0 && (strcmp(argv[0], "create") == 0 ||
+ strcmp(argv[0], "plumb") == 0)) {
+ if (argc == 1)
+ errx(1, "interface %s already exist",
+ ifname);
+ argc--, argv++;
+ }
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 10:51 PM (1 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31053414
Default Alt Text
D17171.diff (601 B)
Attached To
Mode
D17171: Do not allow use `create` keyword as hostname when ifconfig(8) invoked for already existing interface
Attached
Detach File
Event Timeline
Log In to Comment