base-files: if an ip6addr without a prefix is given, assume /128 - otherwise the...
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 9 Jun 2011 12:25:48 +0000 (12:25 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 9 Jun 2011 12:25:48 +0000 (12:25 +0000)
SVN-Revision: 27145

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

index 2ad6bdd516048acb5f026c169b44555e3dc36964..23bd51a0bd4fd022fdc46af44055ffc7b1953ff1 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=72
+PKG_RELEASE:=73
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
index 7e4a53d0a7f08bee7259cdaf986ed59e3c4a2d0a..76ba324973cc6e9cc3ca26452112d17267d873fa 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"