Subject: Re: PR/22418 dhclient does not always (never?) update default route
To: None <gnats-bugs@NetBSD.org>
From: None <lacombar@gmail.com>
List: netbsd-bugs
Date: 09/29/2006 16:03:15
i encounter this bahaviour when a default route already exist. The
following patch should correct the problem (at least, it works for
me):
Index: usr.sbin/dhcp/clientscript/dhclient-script
===================================================================
RCS file: /data/netbsd/cvsroot/src/usr.sbin/dhcp/clientscript/dhclient-script,v
retrieving revision 1.11
diff -b -u -r1.11 dhclient-script
--- usr.sbin/dhcp/clientscript/dhclient-script 23 Sep 2006 22:54:43
-0000 1.11
+++ usr.sbin/dhcp/clientscript/dhclient-script 29 Sep 2006 19:46:34 -0000
@@ -59,6 +59,9 @@
add_new_routes() {
for router in $new_routers; do
route add default $router
+ if [ $? -gt 0 ]; then
+ route change default $router
+ fi
done >/dev/null 2>&1
set -- $new_static_routes