netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: have ipconfig not wait if no dev is available
@ 2011-12-20  8:58 Gerlando Falauto
  2011-12-20 19:09 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Gerlando Falauto @ 2011-12-20  8:58 UTC (permalink / raw)
  Cc: Gerlando Falauto, Micha Nelissen, Holger Brunck, David S. Miller,
	Alexey Kuznetsov, Pekka Savola (ipv6), James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy,
	open list:NETWORKING [IPv4/..., open list

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 <micha@neli.hopto.org>
Cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
---
 net/ipv4/ipconfig.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index ab7e554..7fbcaba 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)) {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: have ipconfig not wait if no dev is available
  2011-12-20  8:58 [PATCH] net: have ipconfig not wait if no dev is available Gerlando Falauto
@ 2011-12-20 19:09 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-12-20 19:09 UTC (permalink / raw)
  To: gerlando.falauto
  Cc: micha, holger.brunck, kuznet, pekkas, jmorris, yoshfuji, kaber,
	netdev, linux-kernel

From: Gerlando Falauto <gerlando.falauto@keymile.com>
Date: Tue, 20 Dec 2011 09:58:04 +0100

> 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 <micha@neli.hopto.org>
> Cc: Holger Brunck <holger.brunck@keymile.com>
> Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-20 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20  8:58 [PATCH] net: have ipconfig not wait if no dev is available Gerlando Falauto
2011-12-20 19:09 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).