2007-02-01 11:40:12

by Joakim Tjernlund

[permalink] [raw]
Subject: ip_auto_config bug in 2.6.20-rc6

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.

Jocke



2007-02-02 13:09:49

by Joakim Tjernlund

[permalink] [raw]
Subject: [PATCH]ip_auto_config bug in 2.6.20-rc6

On Thu, 2007-02-01 at 12:26 +0100, Joakim Tjernlund wrote:
> 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.
>
> Jocke

The following patch fixes the above problem. This change was present in
2.4 but has been removed from 2.6, dunno why.

Signed-off-by: Joakim Tjernlund <[email protected]>

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 9f245de..b90479c 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1282,7 +1282,8 @@ static int __init ip_auto_config(void)
#ifdef CONFIG_ROOT_NFS
(MAJOR(ROOT_DEV) == UNNAMED_MAJOR
&& root_server_addr == NONE
- && ic_servaddr == NONE) ||
+ && ic_servaddr == NONE
+ && ROOT_DEV == Root_NFS) ||
#endif
ic_first_dev->next) {
#ifdef IPCONFIG_DYNAMIC


2007-02-02 13:33:49

by Jan Engelhardt

[permalink] [raw]
Subject: Re: [PATCH]ip_auto_config bug in 2.6.20-rc6


On Feb 2 2007 14:09, Joakim Tjernlund wrote:
>On Thu, 2007-02-01 at 12:26 +0100, Joakim Tjernlund wrote:
>> 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.

I just wonder why IP_PNP has not been obsoleted and removed from the
tree yet, given that initramfs is the advertised way to do so such
things.


Jan
--

2007-02-02 15:47:25

by Joakim Tjernlund

[permalink] [raw]
Subject: RE: [PATCH]ip_auto_config bug in 2.6.20-rc6

> -----Original Message-----
> From: Thomas Bogendoerfer [mailto:[email protected]]
> Sent: 02 February 2007 16:18
> To: Jan Engelhardt
> Cc: Joakim Tjernlund; Netdev; Linux-Kernel
> Subject: Re: [PATCH]ip_auto_config bug in 2.6.20-rc6
>
> On Fri, Feb 02, 2007 at 02:27:29PM +0100, Jan Engelhardt wrote:
> > >> I think this is a bug since I am not using a NFS root FS.
> >
> > I just wonder why IP_PNP has not been obsoleted and removed
> from the
> > tree yet, given that initramfs is the advertised way to do so such
> > things.
>
> I hope this will not happen. Using BOOTP/NFS makes kernel hacking much
> easier on not yet supported machines, which offer tftp in
> their firmware.
>
> Thomas.

Just want to add a me too :)

Jocke

PS.
This is the first mail I have received in response to my postings,
please
CC me on any replies.

2007-02-02 15:48:52

by Thomas Bogendoerfer

[permalink] [raw]
Subject: Re: [PATCH]ip_auto_config bug in 2.6.20-rc6

On Fri, Feb 02, 2007 at 02:27:29PM +0100, Jan Engelhardt wrote:
> >> I think this is a bug since I am not using a NFS root FS.
>
> I just wonder why IP_PNP has not been obsoleted and removed from the
> tree yet, given that initramfs is the advertised way to do so such
> things.

I hope this will not happen. Using BOOTP/NFS makes kernel hacking much
easier on not yet supported machines, which offer tftp in their firmware.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]