summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcp
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-01-09 07:49:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-01-09 07:49:08 +0000
commit84373d19684616502c2bd5180aa29aeec805f1e4 (patch)
tree90de663c00c36445a94248fd1fa6ac5fade6f90c /usr.sbin/dhcp
parenta7b4e7840a7da6ff3cd104be2b436ad091f16177 (diff)
Delete default route before attempting to add the new one, or the old one
stays; itojun ok
Diffstat (limited to 'usr.sbin/dhcp')
-rw-r--r--usr.sbin/dhcp/dhclient/scripts/dhclient-script3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/dhcp/dhclient/scripts/dhclient-script b/usr.sbin/dhcp/dhclient/scripts/dhclient-script
index 8c546713f1f..f6eb192b60a 100644
--- a/usr.sbin/dhcp/dhclient/scripts/dhclient-script
+++ b/usr.sbin/dhcp/dhclient/scripts/dhclient-script
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: dhclient-script,v 1.15 2003/06/16 00:45:16 krw Exp $
+# $OpenBSD: dhclient-script,v 1.16 2004/01/09 07:49:07 deraadt Exp $
#
# Copyright (c) 2003 Kenneth R Westerback <krw@openbsd.org>
#
@@ -72,6 +72,7 @@ delete_old_routes() {
}
add_new_routes() {
+ route delete default >/dev/null 2>&1
for router in $new_routers; do
route add default $router >/dev/null 2>&1
# 2nd and subsequent default routers error out, so explicitly