[backfire] merge r27145
[openwrt-10.03/.git] / package / base-files / files / lib / network / config.sh
index cb3cec515030786db34e179294b9f917a488c8ed..0764b658dddbc32f23d1e305a72354c050ca199b 100755 (executable)
@@ -235,6 +235,11 @@ setup_interface_static() {
        config_get bcast "$config" broadcast
        config_get metric "$config" metric
 
+       case "$ip6addr" in
+               */*) ;;
+               *:*) ip6addr="$ip6addr/128" ;;
+       esac
+
        [ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" broadcast "${bcast:-+}"
        [ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr"
        [ -z "$gateway" ] || $DEBUG route add default gw "$gateway" ${metric:+metric $metric} dev "$iface"