net_server: fixed configuring disabled interfaces.
* BNetworkSettings now set unspecified addresses to their empty family specific addresses, instead of using AF_UNSPEC. * This allows the net_server to set those addresses on the address specific stack interface.
This commit is contained in:
@@ -196,8 +196,11 @@ get_address_family(const char* argument)
|
||||
static bool
|
||||
parse_address(int32& family, const char* argument, BNetworkAddress& address)
|
||||
{
|
||||
if (argument == NULL)
|
||||
if (argument == NULL) {
|
||||
if (family != AF_UNSPEC)
|
||||
address.SetToWildcard(family);
|
||||
return false;
|
||||
}
|
||||
|
||||
status_t status = address.SetTo(family, argument, (uint16)0,
|
||||
B_NO_ADDRESS_RESOLUTION);
|
||||
|
||||
@@ -504,7 +504,8 @@ NetServer::_ConfigureInterface(BMessage& message)
|
||||
if (!addressSettings.Address().IsEmpty()
|
||||
|| !addressSettings.Mask().IsEmpty()
|
||||
|| !addressSettings.Broadcast().IsEmpty()
|
||||
|| !addressSettings.Peer().IsEmpty()) {
|
||||
|| !addressSettings.Peer().IsEmpty()
|
||||
|| !addressSettings.IsAutoConfigure()) {
|
||||
BNetworkInterfaceAddress interfaceAddress;
|
||||
interfaceAddress.SetAddress(addressSettings.Address());
|
||||
interfaceAddress.SetMask(addressSettings.Mask());
|
||||
|
||||
Reference in New Issue
Block a user