summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2006-01-10 05:33:33 +0000
committerbrooks <brooks@FreeBSD.org>2006-01-10 05:33:33 +0000
commit782a252f49aa4ed8dd195bcd9730ba3f0fddf8d7 (patch)
tree1ac8454760a317bfae90a9f3a691d6e8d7bdf77d /sbin
parenta336b443c30c2bfacf61b166d8f92f8471bcd38f (diff)
downloadFreeBSD-src-782a252f49aa4ed8dd195bcd9730ba3f0fddf8d7.zip
FreeBSD-src-782a252f49aa4ed8dd195bcd9730ba3f0fddf8d7.tar.gz
When we give up on an interface, use the arp(8) command to remove all
entries from the interface rather than using ifconfig's delete command. This preserves non-dhclient configured addresses (though they are wiped out when dhclient is restarted). MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/dhclient-script7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient-script b/sbin/dhclient/dhclient-script
index fbf6e39..fd1fd61 100644
--- a/sbin/dhclient/dhclient-script
+++ b/sbin/dhclient/dhclient-script
@@ -19,9 +19,10 @@
#
#
-NETSTAT=/usr/bin/netstat
+ARP=/usr/sbin/arp
AWK=/usr/bin/awk
HOSTNAME=/bin/hostname
+NETSTAT=/usr/bin/netstat
LOCALHOST=127.0.0.1
@@ -257,7 +258,9 @@ EXPIRE|FAIL)
delete_old_address
delete_old_routes
fi
- ifconfig $interface delete
+ if [ -x $ARP ]; then
+ $ARP -d -a -i $interface
+ fi
# XXX Why add alias we just deleted above?
add_new_alias
if [ -f /etc/resolv.conf.save ]; then
OpenPOWER on IntegriCloud