6in4: add support for native IPv6 prefix handling
authorSteven Barth <cyrus@openwrt.org>
Tue, 15 Jan 2013 13:08:05 +0000 (13:08 +0000)
committerSteven Barth <cyrus@openwrt.org>
Tue, 15 Jan 2013 13:08:05 +0000 (13:08 +0000)
SVN-Revision: 35171

package/network/ipv6/6in4/Makefile
package/network/ipv6/6in4/files/6in4.sh

index fcb0a7e75615b6fc2b4b347166254237b5b58b7d..cddf0372e5d7fca59619bf2b83c81d2f06e448d2 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=6in4
-PKG_VERSION:=12
+PKG_VERSION:=13
 PKG_RELEASE:=1
 
 include $(INCLUDE_DIR)/package.mk
index 651d7b97b7e20ecbae6623b3104f51ec61a50e85..ef2532234619bb7664adde365394423a5aba8ea9 100755 (executable)
@@ -14,8 +14,8 @@ proto_6in4_setup() {
        local iface="$2"
        local link="6in4-$cfg"
 
-       local mtu ttl ipaddr peeraddr ip6addr tunnelid username password
-       json_get_vars mtu ttl ipaddr peeraddr ip6addr tunnelid username password
+       local mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password
+       json_get_vars mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password
 
        [ -z "$peeraddr" ] && {
                proto_notify_error "$cfg" "MISSING_ADDRESS"
@@ -43,6 +43,8 @@ proto_6in4_setup() {
                proto_add_ipv6_address "$local6" "$mask6"
        }
 
+       [ -n "$ip6prefix" ] && proto_add_ipv6_prefix "$ip6prefix"
+
        proto_add_tunnel
        json_add_string mode sit
        json_add_int mtu "${mtu:-1280}"
@@ -79,6 +81,7 @@ proto_6in4_init_config() {
 
        proto_config_add_string "ipaddr"
        proto_config_add_string "ip6addr"
+       proto_config_add_string "ip6prefix"
        proto_config_add_string "peeraddr"
        proto_config_add_string "tunnelid"
        proto_config_add_string "username"