DHCPClient: Check return code of SetAddress().
This should break DHCP for everyone it currently works for (according to our analysis). If it doesn't, we have yet another (set of) bug(s).
This commit is contained in:
@@ -763,10 +763,17 @@ DHCPClient::_ParseOptions(dhcp_message& message, BMessage& address,
|
||||
break;
|
||||
}
|
||||
case OPTION_SERVER_ADDRESS:
|
||||
{
|
||||
syslog(LOG_DEBUG, " server: %s\n",
|
||||
_AddressToString(data).String());
|
||||
fServer.SetAddress(*(in_addr_t*)data);
|
||||
status_t status = fServer.SetAddress(*(in_addr_t*)data);
|
||||
if (status != B_OK) {
|
||||
syslog(LOG_ERR, " BNetworkAddress::SetAddress failed with %s!\n",
|
||||
strerror(status));
|
||||
fServer.Unset();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case OPTION_ADDRESS_LEASE_TIME:
|
||||
syslog(LOG_DEBUG, " lease time: %lu seconds\n",
|
||||
|
||||
Reference in New Issue
Block a user