mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
net_server: Remove autoconfiguration client when link goes inactive.
Otherwise DHCP will just keep trying to send requests forever.
This commit is contained in:
parent
f8a8e56595
commit
7aba63496b
@ -172,11 +172,12 @@ AutoconfigLooper::_NetworkMonitorNotification(BMessage* message)
|
||||
if (message->FindInt32("media", &media) != B_OK)
|
||||
break;
|
||||
|
||||
if ((fLastMediaStatus & IFM_ACTIVE) == 0
|
||||
&& (media & IFM_ACTIVE) != 0) {
|
||||
if ((fLastMediaStatus & IFM_ACTIVE) == 0 && (media & IFM_ACTIVE) != 0) {
|
||||
// Reconfigure the interface when we have a link again
|
||||
_ConfigureIPv4();
|
||||
//_ConfigureIPv6(); // TODO: router advertisement and dhcpv6
|
||||
} else if ((fLastMediaStatus & IFM_ACTIVE) != 0 && (media & IFM_ACTIVE) == 0) {
|
||||
_RemoveClient();
|
||||
}
|
||||
|
||||
fLastMediaStatus = media;
|
||||
|
Loading…
Reference in New Issue
Block a user