Don't automatically join a network if we already have a link.
The _ConfigureInterface() method is used as a backend for all configuration tasks. That includes setting addresses manually or by DHCP and changing flags, mtu or metric. Therefore we can't join networks every time it is invoked. Instead we check for an existing link first and only try to join if there is none yet.
This commit is contained in:
@@ -533,7 +533,7 @@ NetServer::_ConfigureInterface(BMessage& message)
|
||||
}
|
||||
|
||||
BNetworkDevice device(name);
|
||||
if (device.IsWireless()) {
|
||||
if (device.IsWireless() && !device.HasLink()) {
|
||||
const char* networkName;
|
||||
if (message.FindString("network", &networkName) == B_OK) {
|
||||
// join configured network
|
||||
|
||||
Reference in New Issue
Block a user