[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: [IPV4]: Fix ip command line processing.
From: Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date: 2007-12-27 6:59:08
Message-ID: 200712270659.lBR6x8B9022901 () hera ! kernel ! org
[Download RAW message or body]
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a6c05c3d064dbb83be88cba3189beb5db9d2dfc3
Commit: a6c05c3d064dbb83be88cba3189beb5db9d2dfc3
Parent: ecef969e5b376f98b142e22deb1cec2f23e4f5d6
Author: Simon Horman <horms@verge.net.au>
AuthorDate: Tue Dec 25 20:54:42 2007 -0800
Committer: David S. Miller <davem@davemloft.net>
CommitDate: Wed Dec 26 19:36:36 2007 -0800
[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>
---
Documentation/nfsroot.txt | 5 +----
net/ipv4/ipconfig.c | 10 ++++------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/Documentation/nfsroot.txt b/Documentation/nfsroot.txt
index 9b956a9..c86dd38 100644
--- a/Documentation/nfsroot.txt
+++ b/Documentation/nfsroot.txt
@@ -97,10 +97,6 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
autoconfiguration will take place. The most common way to use this
is "ip=dhcp".
- Note that "ip=off" is not the same thing as "ip=::::::off", because in
- the latter autoconfiguration will take place if any of DHCP, BOOTP or RARP
- are compiled in the kernel.
-
<client-ip> IP address of the client.
Default: Determined using autoconfiguration.
@@ -150,6 +146,7 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
off or none: don't use autoconfiguration
on or any: use any protocol available in the kernel
+ (default)
dhcp: use DHCP
bootp: use BOOTP
rarp: use RARP
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 96400b0..420f56a 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic