diff options
author | Steven Barth <steven@midlink.org> | 2014-02-20 21:36:15 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-02-20 21:36:15 +0000 |
commit | 873b6c31ed4741c9d5a69ae7f8afa95d7e0d1a21 (patch) | |
tree | 96a3b52a8c95e6b1f7e3e0fdd7f6625581b17028 /package | |
parent | 48d02a5a97e4d853b14d9663eb5def66ede80e63 (diff) | |
download | upstream-873b6c31ed4741c9d5a69ae7f8afa95d7e0d1a21.tar.gz upstream-873b6c31ed4741c9d5a69ae7f8afa95d7e0d1a21.tar.bz2 upstream-873b6c31ed4741c9d5a69ae7f8afa95d7e0d1a21.zip |
6in4: add support for he.net updatekey
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39646 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/network/ipv6/6in4/Makefile | 2 | ||||
-rwxr-xr-x | package/network/ipv6/6in4/files/6in4.sh | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/package/network/ipv6/6in4/Makefile b/package/network/ipv6/6in4/Makefile index 992c5fc67b..ea211e92ef 100644 --- a/package/network/ipv6/6in4/Makefile +++ b/package/network/ipv6/6in4/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6in4 -PKG_VERSION:=14 +PKG_VERSION:=15 PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/ipv6/6in4/files/6in4.sh b/package/network/ipv6/6in4/files/6in4.sh index c4e547f6de..6e53de1e45 100755 --- a/package/network/ipv6/6in4/files/6in4.sh +++ b/package/network/ipv6/6in4/files/6in4.sh @@ -14,8 +14,8 @@ proto_6in4_setup() { local iface="$2" local link="6in4-$cfg" - local mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password sourcerouting - json_get_vars mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password sourcerouting + local mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password updatekey sourcerouting + json_get_vars mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password updatekey sourcerouting [ -z "$peeraddr" ] && { proto_notify_error "$cfg" "MISSING_ADDRESS" @@ -62,11 +62,13 @@ proto_6in4_setup() { proto_send_update "$cfg" - [ -n "$tunnelid" -a -n "$username" -a -n "$password" ] && { + [ -n "$tunnelid" -a -n "$username" -a \( -n "$password" -o -n "$updatekey" \) ] && { [ "${#password}" == 32 -a -z "${password//[a-fA-F0-9]/}" ] || { password="$(echo -n "$password" | md5sum)"; password="${password%% *}" } + [ -n "$updatekey" ] && password="$updatekey" + local url="http://ipv4.tunnelbroker.net/ipv4_end.php?ip=AUTO&apikey=$username&pass=$password&tid=$tunnelid" local try=0 local max=3 @@ -95,6 +97,7 @@ proto_6in4_init_config() { proto_config_add_string "tunnelid" proto_config_add_string "username" proto_config_add_string "password" + proto_config_add_string "updatekey" proto_config_add_int "mtu" proto_config_add_int "ttl" proto_config_add_boolean "sourcerouting" |