diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-06-09 12:25:48 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-06-09 12:25:48 +0000 |
commit | 00938663e2f7f3ea00aa7fbe53174636d293bf27 (patch) | |
tree | ac6863a860f473f08db1d9f911aec5cab26c4ac3 /package/base-files/files | |
parent | eb72b1404840c7f86ef0c46b2c7eba8e40c0a6a3 (diff) |
[package] base-files: if an ip6addr without a prefix is given, assume /128 - otherwise the busybox utilities will interpret it as /0 and create an invalid default route
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27145 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-x | package/base-files/files/lib/network/config.sh | 5 |
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" |