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
This commit is contained in:
parent
9b9c5e1cb1
commit
b1f35e43b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154164
@ -19,9 +19,10 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
NETSTAT=/usr/bin/netstat
|
ARP=/usr/sbin/arp
|
||||||
AWK=/usr/bin/awk
|
AWK=/usr/bin/awk
|
||||||
HOSTNAME=/bin/hostname
|
HOSTNAME=/bin/hostname
|
||||||
|
NETSTAT=/usr/bin/netstat
|
||||||
|
|
||||||
LOCALHOST=127.0.0.1
|
LOCALHOST=127.0.0.1
|
||||||
|
|
||||||
@ -257,7 +258,9 @@ EXPIRE|FAIL)
|
|||||||
delete_old_address
|
delete_old_address
|
||||||
delete_old_routes
|
delete_old_routes
|
||||||
fi
|
fi
|
||||||
ifconfig $interface delete
|
if [ -x $ARP ]; then
|
||||||
|
$ARP -d -a -i $interface
|
||||||
|
fi
|
||||||
# XXX Why add alias we just deleted above?
|
# XXX Why add alias we just deleted above?
|
||||||
add_new_alias
|
add_new_alias
|
||||||
if [ -f /etc/resolv.conf.save ]; then
|
if [ -f /etc/resolv.conf.save ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user