summaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/network
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/lib/network')
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index 7e4a53d0a..76ba32497 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -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"