'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 '<domain>'" 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 <redacted>
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 <dev@brenken.org>
| 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:
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:-"-"}"