parent
bca1813626
commit
b1b51eddee
@ -564,8 +564,11 @@ InterfacesListView::_HandleNetworkMessage(BMessage* message)
|
||||
switch (opcode) {
|
||||
case B_NETWORK_INTERFACE_CHANGED:
|
||||
case B_NETWORK_DEVICE_LINK_CHANGED:
|
||||
if (item != NULL)
|
||||
if (item != NULL) {
|
||||
// Make sure the item reflects the current state
|
||||
item->GetSettings()->ReadConfiguration();
|
||||
InvalidateItem(IndexOf(item));
|
||||
}
|
||||
break;
|
||||
|
||||
case B_NETWORK_INTERFACE_ADDED:
|
||||
|
@ -300,7 +300,6 @@ NetworkSettings::SetConfiguration()
|
||||
interfaceConfig.SetAddress(fAddress[inet_id]);
|
||||
interfaceConfig.SetMask(fNetmask[inet_id]);
|
||||
fNetworkInterface->SetAddress(interfaceConfig);
|
||||
fNetworkInterface->SetTo(zeroAddr);
|
||||
} else {
|
||||
// TODO : test this case (no address set for this protocol)
|
||||
printf("no zeroAddr found for %s(%d), found %" B_PRIu32 "\n",
|
||||
@ -311,6 +310,20 @@ NetworkSettings::SetConfiguration()
|
||||
fNetworkInterface->AddAddress(interfaceConfig);
|
||||
}
|
||||
|
||||
// FIXME these flags shouldn't be interface-global, but specific to
|
||||
// each protocol. Only set them for AF_INET otherwise there is
|
||||
// confusion and freezes.
|
||||
if (fProtocols[index].inet_id == AF_INET) {
|
||||
int32 flags = fNetworkInterface->Flags();
|
||||
if (AutoConfigure(fProtocols[index].inet_id)) {
|
||||
flags |= IFF_AUTO_CONFIGURED;
|
||||
fNetworkInterface->SetFlags(flags);
|
||||
fNetworkInterface->AutoConfigure(fProtocols[index].inet_id);
|
||||
} else {
|
||||
flags &= ~(IFF_AUTO_CONFIGURED | IFF_CONFIGURING);
|
||||
fNetworkInterface->SetFlags(flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user