From 84373d19684616502c2bd5180aa29aeec805f1e4 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 9 Jan 2004 07:49:08 +0000 Subject: Delete default route before attempting to add the new one, or the old one stays; itojun ok --- usr.sbin/dhcp/dhclient/scripts/dhclient-script | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin') 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 # @@ -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 -- cgit v1.2.3