There is no point trying to request back from DHCP a link-local
auto-configured address... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41538 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d7a82feb5c
commit
b6ba1daaac
|
@ -446,6 +446,13 @@ DHCPClient::DHCPClient(BMessenger target, const char* device)
|
|||
BNetworkAddress address = interfaceAddress.Address();
|
||||
const sockaddr_in& addr = (sockaddr_in&)address.SockAddr();
|
||||
fAssignedAddress = addr.sin_addr.s_addr;
|
||||
|
||||
if ((ntohl(fAssignedAddress) & IN_CLASSB_NET) == 0xa9fe0000) {
|
||||
// previous auto-configured address is a link-local one:
|
||||
// there is no point asking a DHCP server to renew such
|
||||
// server-less assigned address...
|
||||
fAssignedAddress = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -561,8 +568,8 @@ DHCPClient::_Negotiate(dhcp_state state)
|
|||
|
||||
_SendMessage(socket, state == INIT ? discover : request,
|
||||
state != RENEWING ? broadcast : fServer);
|
||||
|
||||
continue;
|
||||
|
||||
} else if (bytesReceived < 0)
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue