]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ipv4: fix infinite retry loop in IP-Config
authorBenjamin Zores <benjamin.zores@alcatel-lucent.fr>
Fri, 30 Jan 2009 00:19:13 +0000 (16:19 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Feb 2009 17:28:54 +0000 (09:28 -0800)
[ Upstream commit 9d8dba6c979fa99c96938c869611b9a23b73efa9 ]

Signed-off-by: Benjamin Zores <benjamin.zores@alcatel-lucent.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/ipconfig.c

index 42065fff46c439809c368cd84a9cb83ba5fb22c5..ff75000aa231a46a1364f5580d85493f2cf234b6 100644 (file)
@@ -1272,6 +1272,9 @@ __be32 __init root_nfs_parse_addr(char *name)
 static int __init ip_auto_config(void)
 {
        __be32 addr;
+#ifdef IPCONFIG_DYNAMIC
+       int retries = CONF_OPEN_RETRIES;
+#endif
 
 #ifdef CONFIG_PROC_FS
        proc_net_fops_create(&init_net, "pnp", S_IRUGO, &pnp_seq_fops);
@@ -1308,9 +1311,6 @@ static int __init ip_auto_config(void)
 #endif
            ic_first_dev->next) {
 #ifdef IPCONFIG_DYNAMIC
-
-               int retries = CONF_OPEN_RETRIES;
-
                if (ic_dynamic() < 0) {
                        ic_close_devs();