Skip to content

Commit cd7816d

Browse files
Gerlando Falautodavem330
authored andcommitted
net: have ipconfig not wait if no dev is available
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>
1 parent a76c0ad commit cd7816d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎net/ipv4/ipconfig.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ static int __init ic_open_devs(void)
253253
}
254254
}
255255

256+
/* no point in waiting if we could not bring up at least one device */
257+
if (!ic_first_dev)
258+
goto have_carrier;
259+
256260
/* wait for a carrier on at least one device */
257261
start = jiffies;
258262
while (jiffies - start < msecs_to_jiffies(CONF_CARRIER_TIMEOUT)) {

0 commit comments

Comments
 (0)