path: root/net
diff options
authorGerlando Falauto <>2011-12-19 22:58:04 +0000
committerGreg Kroah-Hartman <>2012-01-06 14:17:27 -0800
commit77fe0b97b750a3064e67330b131811edeebbc29b (patch)
treed75c393fb004ce9ed343cb64a9a0873e87f64daa /net
parentad24a5287dd16619b31b9c30917615ab1fcb56b0 (diff)
net: have ipconfig not wait if no dev is available
[ Upstream commit cd7816d14953c8af910af5bb92f488b0b277e29d ] previous commit 3fb72f1e6e6165c5f495e8dc11c5bbd14c73385c makes IP-Config wait for carrier on at least one network device. Before waiting (predefined value 120s), check that at least one device was successfully brought up. Otherwise (e.g. buggy bootloader which does not set the MAC address) there is no point in waiting for carrier. Cc: Micha Nelissen <> Cc: Holger Brunck <> Signed-off-by: Gerlando Falauto <> Signed-off-by: David S. Miller <> Signed-off-by: Greg Kroah-Hartman <>
Diffstat (limited to 'net')
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 472a8c4f1dc0..004bb74b41c2 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -252,6 +252,10 @@ static int __init ic_open_devs(void)
+ /* no point in waiting if we could not bring up at least one device */
+ if (!ic_first_dev)
+ goto have_carrier;
/* wait for a carrier on at least one device */
start = jiffies;
while (jiffies - start < msecs_to_jiffies(CONF_CARRIER_TIMEOUT)) {