linux-hardened/net
Joakim Tjernlund dcbdc93c6c [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>
2007-08-13 22:51:59 -07:00
..
9p fs: 9p/conv.c error path fix 2007-07-31 15:39:42 -07:00
802 [NET]: Make all initialized struct seq_operations const. 2007-07-10 23:07:31 -07:00
8021q [NET]: ethtool ops are the only way 2007-07-31 14:00:02 -07:00
appletalk [NET]: Make all initialized struct seq_operations const. 2007-07-10 23:07:31 -07:00
atm [ATM]: Eliminate dead config variable CONFIG_BR2684_FAST_TRANS. 2007-07-18 01:46:52 -07:00
ax25 [NET] AX25: Fix whitespace errors. 2007-07-19 10:43:13 +09:00
bluetooth [BLUETOOTH] l2cap: don't mangle cmd.len 2007-07-31 02:28:09 -07:00
bridge [NET]: ethtool ops are the only way 2007-07-31 14:00:02 -07:00
core [NET] net/core/utils: fix sparse warning 2007-08-07 18:02:43 -07:00
dccp mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
decnet [DECNET]: kmalloc + memset conversion to kzalloc 2007-07-31 14:05:56 -07:00
econet [SK_BUFF]: Convert skb->tail to sk_buff_data_t 2007-04-25 22:26:28 -07:00
ethernet [ETH]: Validate address in eth_mac_addr 2007-07-11 19:41:18 -07:00
ieee80211 [PATCH] softmac: Fix deadlock of wx_set_essid with assoc work 2007-08-06 15:06:03 -04:00
ipv4 [IPCONFIG]: ip_auto_config fix 2007-08-13 22:51:59 -07:00
ipv6 [TCP]: Invoke tcp_sendmsg() directly, do not use inet_sendmsg(). 2007-08-02 19:42:28 -07:00
ipx [NET]: Make all initialized struct seq_operations const. 2007-07-10 23:07:31 -07:00
irda [IrDA] Typo fix in irnetlink.c copyright 2007-07-21 19:06:53 -07:00
iucv [S390] Convert to smp_call_function_single. 2007-07-27 12:29:17 +02:00
key [PF_KEY]: Fix ipsec not working in 2.6.23-rc1-git10 2007-08-02 19:42:29 -07:00
lapb [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
llc [NET]: Make all initialized struct seq_operations const. 2007-07-10 23:07:31 -07:00
mac80211 [PATCH] mac80211: don't allow scanning in monitor mode 2007-08-06 15:39:15 -04:00
netfilter [NETFILTER]: ctnetlink: return EEXIST instead of EINVAL for existing nat'ed conntracks 2007-08-07 18:11:26 -07:00
netlabel [NetLabel]: add missing rcu_dereference() calls in the LSM domain mapping hash table 2007-08-07 17:53:10 -07:00
netlink [GENETLINK]: Correctly report errors while registering a multicast group 2007-07-24 15:34:53 -07:00
netrom [NET] NETROM: Fix whitespace errors. 2007-07-19 10:44:32 +09:00
packet [NET] PACKET: Fix whitespace errors. 2007-07-19 10:44:35 +09:00
rfkill [NET] RFKILL: Fix whitespace errors. 2007-07-19 10:44:38 +09:00
rose [NET] ROSE: Fix whitespace errors. 2007-07-19 10:44:40 +09:00
rxrpc net/* misc endianness annotations 2007-07-26 11:11:56 -07:00
sched [NET]: Fix prio_tune() handling of root qdisc. 2007-07-31 02:28:20 -07:00
sctp SCTP: remove useless code in function sctp_init_cause 2007-08-02 10:56:07 -04:00
sunrpc SUNRPC: Replace flush_workqueue() with cancel_work_sync() and friends 2007-08-07 16:13:01 -04:00
tipc [TIPC]: Fix two minor sparse warnings. 2007-08-02 19:42:31 -07:00
unix [AF_UNIX]: Make code static. 2007-07-31 02:28:27 -07:00
wanrouter [NET]: Removal of duplicated include net/wanrouter/wanmain.c 2007-08-02 19:42:22 -07:00
wireless [PATCH] cfg80211: Radiotap parser 2007-07-12 16:07:24 -04:00
x25 [NET]: Make all initialized struct seq_operations const. 2007-07-10 23:07:31 -07:00
xfrm Net/Security: fix memory leaks from security_secid_to_secctx() 2007-08-02 11:52:26 -04:00
compat.c O_CLOEXEC for SCM_RIGHTS 2007-07-16 09:05:45 -07:00
Kconfig 9p: Reorganization of 9p file system code 2007-07-14 15:13:40 -05:00
Makefile 9p: Reorganization of 9p file system code 2007-07-14 15:13:40 -05:00
nonet.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
socket.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
sysctl_net.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
TUNABLE