summaryrefslogtreecommitdiff
path: root/net.BSD
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-08-03 13:54:46 +0000
committerRoy Marples <roy@marples.name>2007-08-03 13:54:46 +0000
commit9169c51d39ed17b98f6617f89fdf9d01723bff52 (patch)
treef2f522daf1374a573c823a731e3f13790cac70ce /net.BSD
parent65a9e4618baadff217dd36216b5c64f2ad66dfc6 (diff)
downloadopenrc-9169c51d39ed17b98f6617f89fdf9d01723bff52.tar.gz
openrc-9169c51d39ed17b98f6617f89fdf9d01723bff52.tar.bz2
openrc-9169c51d39ed17b98f6617f89fdf9d01723bff52.tar.xz
Fix adding multiple IP addresses, #187526.
Diffstat (limited to 'net.BSD')
-rw-r--r--net.BSD/ifconfig.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/net.BSD/ifconfig.sh b/net.BSD/ifconfig.sh
index 06be70c..92a7733 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() {