From: Dirk Brenken Date: Sat, 8 Aug 2026 12:20:50 +0000 (+0200) Subject: travelmate: treat an unresolvable captive portal as an error X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=7f99005b4cc9675108c1c1388bc5bd64c08f41e8;p=openwrt-packages.git travelmate: treat an unresolvable captive portal as an error 'trm_netcheck' only ever fired on "net nok", but f_net() reports a detected portal as "net cp" regardless of 'trm_captive' - the option gates the portal handling, not the detection. With 'trm_captive' disabled travelmate neither adds the portal domain to the dhcp rebind allowlist nor runs a login script, so that state can never resolve on its own: the uplink stayed connected as "net cp ''" forever, the vpn was never brought up (it requires "net ok") and 'trm_netcheck' never kicked in - travelmate stuck to exactly the uplink the option is meant to get rid of. Downgrade "net cp" to "net nok" in f_net() when the portal handling is off. With 'trm_captive' enabled nothing changes. Signed-off-by: Dirk Brenken --- diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile index a7db32390..f5b50dd05 100644 --- a/net/travelmate/Makefile +++ b/net/travelmate/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=travelmate PKG_VERSION:=2.4.7 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/travelmate/files/README.md b/net/travelmate/files/README.md index 08505bb40..663ecdb88 100644 --- a/net/travelmate/files/README.md +++ b/net/travelmate/files/README.md @@ -169,7 +169,7 @@ The `status` sub-command prints the current runtime information: | trm_stdvpnservice | -, not set | standard vpn service which will be automatically added to new STA profiles | | trm_stdvpniface | -, not set | standard vpn interface which will be automatically added to new STA profiles | -**Please note:** 'trm_netcheck' is evaluated independently of 'trm_captive'. A detected captive portal does not count as an error, such an uplink stays connected so that a manual or script based portal login is still possible. Only a failed connectivity check counts, and it is confirmed by a second probe before it is acted on. Such a failure is then handled like a failed connection attempt: after 'trm_maxretry' tries the affected uplink gets disabled in the travelmate config. A longer lasting outage of your upstream provider may therefore disable all configured uplinks, which have to be re-enabled manually. +**Please note:** 'trm_netcheck' is evaluated independently of 'trm_captive'. A detected captive portal does not count as an error as long as 'trm_captive' is enabled - such an uplink stays connected so that a manual or script based portal login is still possible. With 'trm_captive' disabled travelmate can neither allowlist the portal domain nor run a login script, so a detected portal is treated like a failed connectivity check. Only a failed connectivity check counts, and it is confirmed by a second probe before it is acted on. Such a failure is then handled like a failed connection attempt: after 'trm_maxretry' tries the affected uplink gets disabled in the travelmate config. A longer lasting outage of your upstream provider may therefore disable all configured uplinks, which have to be re-enabled manually. * Per uplink there is an additional 'uplink' section in the travelmate config, with the following options: diff --git a/net/travelmate/files/travelmate-functions.sh b/net/travelmate/files/travelmate-functions.sh index d5d78f909..1aaab6788 100644 --- a/net/travelmate/files/travelmate-functions.sh +++ b/net/travelmate/files/travelmate-functions.sh @@ -876,6 +876,15 @@ f_net() { fi fi fi + + # without captive portal handling travelmate can neither allowlist the portal + # domain nor run a login script, so a detected portal is a dead end, not an + # expected intermediate state + # + case "${result}" in + "net cp"*) [ "${trm_captive}" = "0" ] && result="net nok" ;; + esac + printf "%s" "${result}" f_log "debug" "f_net ::: timeout: $((trm_maxwait / 6)), cp (url/html/js): ${json_cp:-"-"}/${html_cp:-"-"}/${js_cp:-"-"}, result: ${result}, error (rc/msg): ${json_ec}/${err_msg:-"-"}, probe_host: ${probe_host:-"-"}, eff_url: ${json_cp_url:-"-"}"