Don't and/remove a route to our assigned IP through 127.0.0.1. It

serves no apparent purpose (we commented this out ages ago in the ISC
scripts) and cases problems with some ADSL setups.

Reported by:	Rostislav Krasny <rosti dot bsd at gmail dot com>
This commit is contained in:
brooks 2005-08-26 01:02:38 +00:00
parent 55a9c3b304
commit c56a18dd49

View File

@ -74,7 +74,7 @@ add_new_address() {
delete_old_alias() {
if [ -n "$alias_ip_address" ]; then
ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
route delete $alias_ip_address $LOCALHOST > /dev/null 2>&1
#route delete $alias_ip_address $LOCALHOST > /dev/null 2>&1
fi
}
@ -82,12 +82,12 @@ add_new_alias() {
if [ -n "$alias_ip_address" ]; then
ifconfig $interface inet alias $alias_ip_address netmask \
$alias_subnet_mask
route add $alias_ip_address $LOCALHOST
#route add $alias_ip_address $LOCALHOST
fi
}
delete_old_routes() {
route delete "$old_ip_address" $LOCALHOST >/dev/null 2>&1
#route delete "$old_ip_address" $LOCALHOST >/dev/null 2>&1
for router in $old_routers; do
if [ $if_defaultroute = x -o $if_defaultroute = $interface ]; then
route delete default $route >/dev/null 2>&1
@ -106,7 +106,7 @@ delete_old_routes() {
}
add_new_routes() {
route add $new_ip_address $LOCALHOST >/dev/null 2>&1
#route add $new_ip_address $LOCALHOST >/dev/null 2>&1
for router in $new_routers; do
if [ "$new_ip_address" = "$router" ]; then
route add default -iface $router >/dev/null 2>&1