Changeset 40877


Ignore:
Timestamp:
2014-05-29T11:42:25+02:00 (4 years ago)
Author:
jow
Message:

AA: 6in4: backport r39646 and r40876 (#15054, #16617)

Location:
branches/attitude_adjustment/package/6in4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/attitude_adjustment/package/6in4/Makefile

    r36706 r40877  
    11# 
    2 # Copyright (C) 2010-2012 OpenWrt.org 
     2# Copyright (C) 2010-2014 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    99 
    1010PKG_NAME:=6in4 
    11 PKG_VERSION:=14 
     11PKG_VERSION:=16 
    1212PKG_RELEASE:=1 
    1313 
  • branches/attitude_adjustment/package/6in4/files/6in4.sh

    r36706 r40877  
    1515        local link="6in4-$cfg" 
    1616 
    17         local mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password 
    18         json_get_vars mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password 
     17        local mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password updatekey 
     18        json_get_vars mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password updatekey 
    1919 
    2020        [ -z "$peeraddr" ] && { 
     
    5656        proto_send_update "$cfg" 
    5757 
    58         [ -n "$tunnelid" -a -n "$username" -a -n "$password" ] && { 
     58        [ -n "$tunnelid" -a -n "$username" -a \( -n "$password" -o -n "$updatekey" \) ] && { 
    5959                [ "${#password}" == 32 -a -z "${password//[a-fA-F0-9]/}" ] || { 
    6060                        password="$(echo -n "$password" | md5sum)"; password="${password%% *}" 
    6161                } 
    6262 
    63                 local url="http://ipv4.tunnelbroker.net/ipv4_end.php?ip=AUTO&apikey=$username&pass=$password&tid=$tunnelid" 
     63                [ -n "$updatekey" ] && password="$updatekey" 
     64 
     65                local url="http://ipv4.tunnelbroker.net/nic/update?username=$username&password=$password&hostname=$tunnelid" 
    6466                local try=0 
    6567                local max=3 
     
    8991        proto_config_add_string "username" 
    9092        proto_config_add_string "password" 
     93        proto_config_add_string "updatekey" 
    9194        proto_config_add_int "mtu" 
    9295        proto_config_add_int "ttl" 
Note: See TracChangeset for help on using the changeset viewer.