* 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:
Axel Dörfler
2006-12-12 02:56:23 +00:00
parent 0cf5e6ac7d
commit ef8ff79cdb
2 changed files with 2 additions and 8 deletions
+1 -8
View File
@@ -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;
+1
View File
@@ -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));