patch for dhclient-script

Brian Millett bpm at ec-group.com
Sun Jun 13 17:36:27 UTC 2004


For what its worth, I noticed that with the rawhide update on Sat, June
12, the dchp client no longer routed.  I determined that before
dhclient-script finished, there were two entries for default:

default         *               0.0.0.0         U         0 0          0 eth1
default         192.168.0.1     0.0.0.0         UG        0 0          0 eth1

But then when dhclient-script would finish, the default gw for 192.168.0.1
world be deleted leaving only the * default gateway.  The following patch
resolves this, but I do not know it it messes other things.

diff -wruN /tmp/sbin/dhclient-script dhclient-script
--- /tmp/sbin/dhclient-script   2004-06-12 16:31:29.000000000 -0500
+++ dhclient-script     2004-06-13 12:11:56.000000000 -0500
@@ -128,12 +128,14 @@
   elif [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0
] ) then
     ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
                broadcast 255.255.255.255 up
+       #Add route to make broadcast work. Do not omit netmask.
+    route add default dev $interface netmask 0.0.0.0
   else
     ifconfig $interface 0 up
   fi

   # Add route to make broadcast work. Do not omit netmask.
-  route add default dev $interface netmask 0.0.0.0
+  #route add default dev $interface netmask 0.0.0.0

   # We need to give the kernel some time to get the interface up.
   sleep 1


-- 
Brian Millett
Enterprise Consulting Group  "Shifts in paradigms
(314) 205-9030           often cause nose bleeds."
bpmATec-groupDOTcom                     Greg Glenn







More information about the fedora-devel-list mailing list