* A copy and paste bug prevented the gateway to be added (worked before the
previous commit). * Removed the acceptance of a missing DHCP acknowledge message. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19470 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -369,15 +369,8 @@ DHCPClient::DHCPClient(BMessenger target, const char* device)
|
||||
|
||||
if (state == INIT)
|
||||
fStatus = _SendMessage(socket, discover, broadcast);
|
||||
else if (state == REQUESTING) {
|
||||
if (fTries > 0) {
|
||||
// The server not only didn't acknowledge the address, it did nothing.
|
||||
// So we just ignore this little annoyance and continue with life.
|
||||
fStatus = B_OK;
|
||||
break;
|
||||
}
|
||||
if (state == REQUESTING)
|
||||
fStatus = _SendMessage(socket, request, broadcast);
|
||||
}
|
||||
|
||||
if (fStatus < B_OK)
|
||||
break;
|
||||
|
||||
@@ -428,6 +428,7 @@ NetServer::_ConfigureInterface(int socket, BMessage& interface, bool fromMessage
|
||||
route.flags = RTF_STATIC | RTF_DEFAULT | RTF_GATEWAY;
|
||||
route.gateway = &gateway;
|
||||
|
||||
request.ifr_route = route;
|
||||
if (ioctl(socket, SIOCADDRT, &request, sizeof(request)) < 0) {
|
||||
fprintf(stderr, "%s: Could not add route for %s: %s\n",
|
||||
Name(), device, strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user