aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>2011-09-14 13:37:40 +0000
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>2011-09-14 13:37:40 +0000
commit200fd7bce1013e4830cc799cf3ff0a24c502a77f (patch)
tree6f1ed3d62ace26223f5a3c63fcd91cc9c5d53aed /package/base-files
parent34f2cfc657af5d0bb0224e1630faeac7986350be (diff)
downloadupstream-200fd7bce1013e4830cc799cf3ff0a24c502a77f.tar.gz
upstream-200fd7bce1013e4830cc799cf3ff0a24c502a77f.tar.bz2
upstream-200fd7bce1013e4830cc799cf3ff0a24c502a77f.zip
Revert "[package] base-files: Add support for assigning multiple IPv6 addresses on an interface"
Multiple IPv6 addresses should be handled with alias sections SVN-Revision: 28240
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index 5975f17dfc..cf5b197b59 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -242,10 +242,10 @@ setup_interface_static() {
local iface="$1"
local config="$2"
- local ipaddr netmask ip6addrs ipaddr
+ local ipaddr netmask ip6addr
config_get ipaddr "$config" ipaddr
config_get netmask "$config" netmask
- config_get ip6addrs "$config" ip6addr
+ config_get ip6addr "$config" ip6addr
[ -z "$ipaddr" -o -z "$netmask" ] && [ -z "$ip6addr" ] && return 1
local gateway ip6gw dns bcast metric
@@ -255,14 +255,13 @@ setup_interface_static() {
config_get bcast "$config" broadcast
config_get metric "$config" metric
+ case "$ip6addr" in
+ */*) ;;
+ *:*) ip6addr="$ip6addr/64" ;;
+ esac
+
[ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" broadcast "${bcast:-+}"
- for ip6addr in $ip6addrs; do
- case "$ip6addr" in
- */*) ;;
- *:*) ip6addr="$ip6addr/64" ;;
- esac
- $DEBUG ifconfig "$iface" add "$ip6addr"
- done
+ [ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr"
[ -z "$gateway" ] || $DEBUG route add default gw "$gateway" ${metric:+metric $metric} dev "$iface"
[ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" ${metric:+metric $metric} dev "$iface"
[ -z "$dns" ] || add_dns "$config" $dns