Skip to content

Commit

Permalink
net: have ipconfig not wait if no dev is available
Browse files Browse the repository at this point in the history
previous commit 3fb72f1
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 <micha@neli.hopto.org>
Cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gerlando Falauto authored and David S. Miller committed Dec 20, 2011
1 parent a76c0ad commit cd7816d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/ipv4/ipconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,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)) {
Expand Down

0 comments on commit cd7816d

Please sign in to comment.