From 274b8be6c415dfb623f95ca9e4709c9f79836ae9 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 2 Apr 2013 02:57:14 +0200 Subject: [PATCH] Don't try to auto-configure network interfaces with no link. We already start watching for link state changes, so as soon as a link is established the configuration will be triggered. --- src/servers/net/AutoconfigLooper.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/servers/net/AutoconfigLooper.cpp b/src/servers/net/AutoconfigLooper.cpp index 85bf5a88b0..9942bc70a5 100644 --- a/src/servers/net/AutoconfigLooper.cpp +++ b/src/servers/net/AutoconfigLooper.cpp @@ -125,8 +125,12 @@ void AutoconfigLooper::_ReadyToRun() { start_watching_network(B_WATCH_NETWORK_LINK_CHANGES, this); - _ConfigureIPv4(); - //_ConfigureIPv6(); // TODO: router advertisement and dhcpv6 + + BNetworkInterface interface(fDevice.String()); + if (interface.HasLink()) { + _ConfigureIPv4(); + //_ConfigureIPv6(); // TODO: router advertisement and dhcpv6 + } }