diff options
author | Dirk Brenken <dev@brenken.org> | 2019-03-28 20:11:26 +0100 |
---|---|---|
committer | Daniel Engberg <daniel.engberg.lists@pyret.net> | 2019-03-28 23:24:02 +0000 |
commit | a2611c4cd2270c64faadc1d22ea913d48e0f26ca (patch) | |
tree | 756fcdd2f382d2f7aabf2dc384c39690cfe96a9e | |
parent | a6d4bae127c741cf2e7498b394023a5fc137c387 (diff) |
travelmate: Update to 1.4.4
* refine captive portal detection/rebind protection handling,
heavily tested with Deutsche Bahn hotspots ... ;-)
* add rebind whitelist logging
Signed-off-by: Dirk Brenken <dev@brenken.org>
Added "Update to" in commit message
Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
-rw-r--r-- | net/travelmate/Makefile | 2 | ||||
-rwxr-xr-x | net/travelmate/files/travelmate.sh | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile index fb0c443b5..0937f656f 100644 --- a/net/travelmate/Makefile +++ b/net/travelmate/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=travelmate -PKG_VERSION:=1.4.3 +PKG_VERSION:=1.4.4 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0+ PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org> diff --git a/net/travelmate/files/travelmate.sh b/net/travelmate/files/travelmate.sh index cf1e17ed0..f54196316 100755 --- a/net/travelmate/files/travelmate.sh +++ b/net/travelmate/files/travelmate.sh @@ -10,7 +10,7 @@ # LC_ALL=C PATH="/usr/sbin:/usr/bin:/sbin:/bin" -trm_ver="1.4.3" +trm_ver="1.4.4" trm_sysver="unknown" trm_enabled=0 trm_debug=0 @@ -242,16 +242,17 @@ f_check() then result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) "${trm_captiveurl}" -O /dev/null 2>&1 | \ awk '/^Failed to redirect|^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')" - if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ]) + cp_domain="$(printf "%s" "${result}" | awk -F "['| ]" '/^net cp/{printf "%s" $4}')" + if [ -n "${result}" ] && ([ -z "${trm_connection}" ] || [ "${result}" != "${trm_connection%/*}" ] || [ -n "${cp_domain}" ]) then if [ "${trm_rebind:-0}" -eq 1 ] && [ -x "/etc/init.d/dnsmasq" ] then - cp_domain="$(printf "%s" "${result}" | awk -F "['| ]" '/^net cp/{printf "%s" $4}')" while [ -n "${cp_domain}" ] && [ -z "$(uci_get dhcp "@dnsmasq[0]" rebind_domain | grep -Fo "${cp_domain}")" ] do uci -q add_list dhcp.@dnsmasq[0].rebind_domain="${cp_domain}" uci_commit dhcp /etc/init.d/dnsmasq reload + f_log "info" "captive portal domain '${cp_domain}' added to rebind whitelist" result="$(${trm_fetch} --timeout=$(( ${trm_maxwait} / 3 )) "${trm_captiveurl}" -O /dev/null 2>&1 | \ awk '/^Failed to redirect|^Redirected/{printf "%s" "net cp \047"$NF"\047";exit}/^Download completed/{printf "%s" "net ok";exit}/^Failed|^Connection error/{printf "%s" "net nok";exit}')" cp_domain="$(printf "%s" "${result}" | awk -F "['| ]" '/^net cp/{printf "%s" $4}')" |