I found a bug in the dhcpcd client daemon. I found that the client adds a default route and fails to mark the route active. The kernel will in some cases use the default route anyway, but since it is not marked active route or netstat may not show the default in the routing tables. Here is the fix I used to fix it. diff -ru dhcpcd-0.70/if.c dhcpcd-0.70-FIXED/if.c --- dhcpcd-0.70/if.c Mon Sep 1 15:00:24 1997 +++ dhcpcd-0.70-FIXED/if.c Mon Dec 14 12:52:22 1998 @@ -277,7 +277,7 @@ p->sin_addr.s_addr = gwAddr; rtent.rt_dev = ifinfo->ifname; /* interface name */ rtent.rt_metric = 2; /* metric (see route.h) */ - rtent.rt_flags = RTF_GATEWAY; /* dest. is a gateway */ + rtent.rt_flags = RTF_GATEWAY | RTF_UP; /* dest. is a gateway */ if ( ioctl(s, SIOCADDRT, &rtent) < 0 ) { logSysExit("ioctl SIOCADDRT (setDefRoute)"); }
Verified by dlt, wanger jbj, etc 23 DEC 1998.
Jeff has the patch.
Fixed in dist-5.2.1/dhcpcd-0.70-3.
*** Bug 429 has been marked as a duplicate of this bug. *** 1. Use DHCP with FTP install. 2. All the machines boot with no default gateway. Windows machines no problem. DHCP server is a Linux machine. 3. Even when I add GATEWAYDEV="eth0" to /etc/sysconfig/network, only get the gateway when restart network, not when boot. 4. A big problem for us. ------- Additional Comments From jturner 12/10/98 09:49 ------- Can you send the contents of your dhcpd.conf file so that we can recreate you test environment in the lab? ------- Additional Comments From dkl 12/29/98 16:05 ------- This report has been closed due to lack of responce from user. It may be reopened if needed. ------- Additional Comments From andrew 01/06/99 10:56 ------- Additional information has been sent via email.
So please could you put dhcpcd-0.70-3 into the 5.2 updates directory? I mean, this bug is embarrassing to large organisations that use DHCP to configure their clients; they just don't work! It cost me hours of my time. Why make others do the same? Life is short and precious! By the way, where on earth is "dist-5.2.1/dhcpcd-0.70-3"? Please, don't keep those bug fixes secret: please share them with us plebians and common masses when you have them. ------- Email Received From Denzil Boyter <dboyter> 02/19/99 12:21 -------