From e484cc509885ab02ddd4dd99e277b745ffa61b28 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 2 Apr 2013 03:16:06 +0200 Subject: [PATCH] Store the active flag if there is an initial link. This ensures that we don't spuriously re-detect a link if we have a race between starting to watch for link state changes and detecting the initial link. --- src/servers/net/AutoconfigLooper.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/servers/net/AutoconfigLooper.cpp b/src/servers/net/AutoconfigLooper.cpp index 9942bc70a5..5fc84a5fe7 100644 --- a/src/servers/net/AutoconfigLooper.cpp +++ b/src/servers/net/AutoconfigLooper.cpp @@ -130,6 +130,10 @@ AutoconfigLooper::_ReadyToRun() if (interface.HasLink()) { _ConfigureIPv4(); //_ConfigureIPv6(); // TODO: router advertisement and dhcpv6 + + // Also make sure we don't spuriously try to configure again from + // a link changed notification that might race us. + fLastMediaStatus |= IFM_ACTIVE; } }