summaryrefslogtreecommitdiffstats
path: root/src/connections
diff options
context:
space:
mode:
authorRémy Oudompheng <remy@archlinux.org>2011-06-13 14:00:35 +0200
committerRémy Oudompheng <remy@archlinux.org>2011-06-13 14:01:14 +0200
commit67d1a8078a89c34fbf427942a4de24a8c8556e6a (patch)
tree515a34ca821e3aea7d12f05c0464b2abe839e5cd /src/connections
parent9fb49752b99f58577323d81f98f8a790d5648a00 (diff)
downloadnetctl-67d1a8078a89c34fbf427942a4de24a8c8556e6a.tar.gz
netctl-67d1a8078a89c34fbf427942a4de24a8c8556e6a.tar.xz
IPv6: remove PREFIXLEN option and turn ADDR6 into an array
This allows configuring multiple IPv6 addresses on the same interface. Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Diffstat (limited to 'src/connections')
-rw-r--r--src/connections/ethernet11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/connections/ethernet b/src/connections/ethernet
index 902b603..a792922 100644
--- a/src/connections/ethernet
+++ b/src/connections/ethernet
@@ -149,11 +149,12 @@ ethernet_up() {
static)
sysctl -q -w net.ipv6.conf.$INTERFACE.accept_ra=0
if [[ -n "$ADDR6" ]]; then
- [[ -z $PREFIXLEN ]] && PREFIXLEN=64
- report_debug ethernet_iproute_up ip -6 addr add "$ADDR6/$PREFIXLEN" dev "$INTERFACE"
- if ! ip -6 addr add "$ADDR6/$PREFIXLEN" dev "$INTERFACE"; then
- report_iproute "Could not configure interface"
- fi
+ for addr in "${ADDR6[@]}"; do
+ report_debug ethernet_iproute_up ip -6 addr add "$addr" dev "$INTERFACE"
+ if ! ip -6 addr add "$addr" dev "$INTERFACE"; then
+ report_iproute "Could not add address $addr to interface"
+ fi
+ done
fi
if [[ -n "$GATEWAY6" ]]; then
report_debug ethernet_iproute_up ip -6 route add default via "$GATEWAY6"