Add and delete IPv6 addresses and routes correctly on FreeBSD, #184430

thanks to Friedrich Oslage.
This commit is contained in:
Roy Marples 2007-07-06 18:03:17 +00:00
parent 913b3b1f6b
commit 69c459578e
2 changed files with 15 additions and 4 deletions

View File

@ -1,6 +1,11 @@
# ChangeLog for Gentoo System Intialization ("rc") scripts
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
06 Jul 2007; Roy Marples <uberlord@gentoo.org>:
Add and delete IPv6 addresses and routes correctly on FreeBSD, #184430
thanks to Friedrich Oslage.
02 Jul 2007; Roy Marples <uberlord@gentoo.org>:
Don't wait for services that were inactive, #183667 thanks to Daniel Drake

View File

@ -63,7 +63,10 @@ _add_address() {
set -- "$@" metric ${metric}
fi
ifconfig "${IFACE}" add "$@"
case "$@" in
*:*) ifconfig "${IFACE}" inet6 add "$@" ;;
*) ifconfig "${IFACE}" add "$@" ;;
esac
}
_add_route() {
@ -75,7 +78,10 @@ _add_route() {
fi
fi
route add "$@"
case "$@" in
*:*) route add -inet6 "$@" ;;
*) route add "$@" ;;
esac
}
_delete_addresses() {
@ -94,7 +100,7 @@ _delete_addresses() {
[ "$1" = "lo" -o "$1" = "lo0" ] && continue
fi
einfo "${addr}"
/sbin/ifconfig "$1" delete "${addr}"
ifconfig "$1" delete "${addr}"
eend $?
done
@ -106,7 +112,7 @@ _delete_addresses() {
::1) continue ;;
esac
einfo "${addr}"
/sbin/ifconfig "${IFACE}" inet6 delete "${addr}"
ifconfig "${IFACE}" inet6 delete "${addr}"
eend $?
done