Bug 429 - dhcpcd creates default route that is marked down when it should be up
Summary: dhcpcd creates default route that is marked down when it should be up
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dhcpcd
Version: 5.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Erik Troan
QA Contact:
: 373 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 1998-12-15 16:08 UTC by D. Boyter
Modified: 2008-05-01 15:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1998-12-23 21:33:29 UTC

Attachments (Terms of Use)

Description D. Boyter 1998-12-15 16:08:26 UTC
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/if.c    Mon Sep  1 15:00:24
+++ dhcpcd-0.70-FIXED/if.c      Mon Dec 14
12:52:22 1998
@@ -277,7 +277,7 @@
= gwAddr;
= ifinfo->ifname;       /* interface name */
= 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)");

Comment 1 David Lawrence 1998-12-23 21:17:59 UTC
Verified by dlt, wanger jbj, etc 23 DEC 1998.

Comment 2 David Lawrence 1998-12-23 21:18:59 UTC
Jeff has the patch.

Comment 3 Jeff Johnson 1998-12-23 21:33:59 UTC
Fixed in dist-5.2.1/dhcpcd-0.70-3.

Comment 4 Jeff Johnson 1999-01-12 11:33:59 UTC
*** 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.

Comment 5 nicku 1999-02-19 01:33:59 UTC
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 -------

Note You need to log in before you can comment on or make changes to this bug.