From 67d1a8078a89c34fbf427942a4de24a8c8556e6a Mon Sep 17 00:00:00 2001 From: Rémy Oudompheng Date: Mon, 13 Jun 2011 14:00:35 +0200 Subject: IPv6: remove PREFIXLEN option and turn ADDR6 into an array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows configuring multiple IPv6 addresses on the same interface. Signed-off-by: Rémy Oudompheng --- src/connections/ethernet | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/connections') 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" -- cgit v1.2.3-24-g4f1b