Backport "[package] base-files: Fix IPv6 address and route adding on aliases with...
authoracinonyx <acinonyx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 14 Sep 2011 13:37:48 +0000 (13:37 +0000)
committeracinonyx <acinonyx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 14 Sep 2011 13:37:48 +0000 (13:37 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@28242 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/files/lib/network/config.sh

index 76a4e23..0892282 100755 (executable)
@@ -261,9 +261,9 @@ setup_interface_static() {
        esac
 
        [ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" broadcast "${bcast:-+}"
-       [ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr"
+       [ -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 "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" ${metric:+metric $metric} dev "${iface%:*}"
        [ -z "$dns" ] || add_dns "$config" $dns
 
        config_get type "$config" TYPE