From 9169c51d39ed17b98f6617f89fdf9d01723bff52 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 3 Aug 2007 13:54:46 +0000 Subject: Fix adding multiple IP addresses, #187526. --- ChangeLog | 3 ++- net.BSD/ifconfig.sh | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 08572d1c..171b7338 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ 03 Aug 2007; Roy Marples : + Fix adding multiple IP addresses, #187526. Fix static IPv6 routes, #187514. * baselayout-2.0.0_rc1 (02 Aug 2007) @@ -15,7 +16,7 @@ 31 Jul 2007; Roy Marples : All our binaries are now multicalls into rc, which makes our on disk size - a lot smaller. + a lot smaller. 23 Jul 2007; Roy Marples : diff --git a/net.BSD/ifconfig.sh b/net.BSD/ifconfig.sh index 06be70cf..92a77338 100644 --- a/net.BSD/ifconfig.sh +++ b/net.BSD/ifconfig.sh @@ -78,6 +78,12 @@ _get_inet_address() { } _add_address() { + local inet6= + + case "$@" in + *:*) inet6=inet6 ;; + esac + if [ "${metric:-0}" != "0" ] ; then set -- "$@" metric ${metric} fi @@ -94,10 +100,7 @@ _add_address() { ;; esac - case "$@" in - *:*) ifconfig "${IFACE}" inet6 "$@" ;; - *) ifconfig "${IFACE}" "$@" ;; - esac + ifconfig "${IFACE}" ${inet6} alias "$@" } _add_route() { -- cgit v1.2.3