summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2007-12-25 20:54:42 -0800
committerDavid S. Miller <davem@davemloft.net>2007-12-26 19:36:36 -0800
commita6c05c3d064dbb83be88cba3189beb5db9d2dfc3 (patch)
tree3520d14af7692de0e66525f94f62948f1dc759cf /net
parentecef969e5b376f98b142e22deb1cec2f23e4f5d6 (diff)
downloadlinux-3.10-a6c05c3d064dbb83be88cba3189beb5db9d2dfc3.tar.gz
linux-3.10-a6c05c3d064dbb83be88cba3189beb5db9d2dfc3.tar.bz2
linux-3.10-a6c05c3d064dbb83be88cba3189beb5db9d2dfc3.zip
[IPV4]: Fix ip command line processing.
Recently the documentation in Documentation/nfsroot.txt was update to note that in fact ip=off and ip=::::::off as the latter is ignored and the default (on) is used. This was certainly a step in the direction of reducing confusion. But it seems to me that the code ought to be fixed up so that ip=::::::off actually turns off ip autoconfiguration. This patch also notes more specifically that ip=on (aka ip=::::::on) is the default. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ipconfig.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 96400b0bd08..420f56ad59f 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1403,6 +1403,10 @@ static int __init ic_proto_name(char *name)
if (!strcmp(name, "on") || !strcmp(name, "any")) {
return 1;
}
+ if (!strcmp(name, "off") || !strcmp(name, "none")) {
+ ic_enable = 0;
+ return 1;
+ }
#ifdef CONFIG_IP_PNP_DHCP
else if (!strcmp(name, "dhcp")) {
ic_proto_enabled &= ~IC_RARP;
@@ -1437,12 +1441,6 @@ static int __init ip_auto_config_setup(char *addrs)
ic_set_manually = 1;
- ic_enable = (*addrs &&
- (strcmp(addrs, "off") != 0) &&
- (strcmp(addrs, "none") != 0));
- if (!ic_enable)
- return 1;
-
if (ic_proto_name(addrs))
return 1;