diff options
author | Roy Marples <roy@marples.name> | 2007-07-06 18:03:17 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-07-06 18:03:17 +0000 |
commit | 69c459578e3b10f7caa2b82a304e728e31969ca5 (patch) | |
tree | 222007e813652b9892ba89979016fe2ca99aa2b8 | |
parent | 913b3b1f6baf1fefed9a0d2c5d1cdefa2c8cef8f (diff) |
Add and delete IPv6 addresses and routes correctly on FreeBSD, #184430
thanks to Friedrich Oslage.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | net.BSD/ifconfig.sh | 14 |
2 files changed, 15 insertions, 4 deletions
@@ -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 diff --git a/net.BSD/ifconfig.sh b/net.BSD/ifconfig.sh index bfc10055..68a3875f 100644 --- a/net.BSD/ifconfig.sh +++ b/net.BSD/ifconfig.sh @@ -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 |