diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2007-08-10 18:14:54 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-08-14 01:51:59 -0400 |
commit | dcbdc93c6c64daf20622d6deae774d1e740efb8d (patch) | |
tree | e4f5282bca6cbd8f20272892d7ee72f8f711a7fe /net | |
parent | 8aee929eda10b2502fd76c0bf2003f89f7992820 (diff) |
[IPCONFIG]: ip_auto_config fix
The following commandline:
root=/dev/mtdblock6 rw rootfstype=jffs2 ip=192.168.1.10:::255.255.255.0:localhost.localdomain:eth1:off console=ttyS0,115200
makes ip_auto_config fall back to DHCP and complain "IP-Config: Incomplete
network configuration information." depending on if CONFIG_IP_PNP_DHCP is
set or not.
The only way I can make ip_auto_config accept my IP config is to add an
entry for the server IP:
ip=192.168.1.10:192.168.1.15::255.255.255.0:localhost.localdomain:eth1:off
I think this is a bug since I am not using a NFS root FS.
The following patch fixes the above problem.
From: Andrew Morton <akpm@linux-foundation.org>
Davem said (in February!):
Well, first of all the change in question is not in 2.4.x either. I just
checked the current 2.4.x GIT tree and the test is exactly:
if (ic_myaddr == INADDR_NONE ||
#ifdef CONFIG_ROOT_NFS
(MAJOR(ROOT_DEV) == UNNAMED_MAJOR
&& root_server_addr == INADDR_NONE
&& ic_servaddr == INADDR_NONE) ||
#endif
ic_first_dev->next) {
which matches 2.6.x
I even checked 2.4.x when it was branched for 2.5.x and the test was the
same at the point in time too.
Looking at the proposed change a bit it appears that it is probably
correct, as it's trying to check that ROOT_DEV is nfs root. But if it is
correct then the UNNAMED_MAJOR comparison in the same code block should be
removed as it becomes superfluous.
I'm happy to apply this patch with that modification made.
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ipconfig.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 342ca8d89458..c5b247077539 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -1281,9 +1281,9 @@ static int __init ip_auto_config(void) | |||
1281 | */ | 1281 | */ |
1282 | if (ic_myaddr == NONE || | 1282 | if (ic_myaddr == NONE || |
1283 | #ifdef CONFIG_ROOT_NFS | 1283 | #ifdef CONFIG_ROOT_NFS |
1284 | (MAJOR(ROOT_DEV) == UNNAMED_MAJOR | 1284 | (root_server_addr == NONE |
1285 | && root_server_addr == NONE | 1285 | && ic_servaddr == NONE |
1286 | && ic_servaddr == NONE) || | 1286 | && ROOT_DEV == Root_NFS) || |
1287 | #endif | 1287 | #endif |
1288 | ic_first_dev->next) { | 1288 | ic_first_dev->next) { |
1289 | #ifdef IPCONFIG_DYNAMIC | 1289 | #ifdef IPCONFIG_DYNAMIC |