travelmate: update 2.0.8
* the domain whitelist feature has been extended to free up multiple nested captive portal domains. Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
parent
f74754fac1
commit
0ee0aa2b53
2 changed files with 19 additions and 14 deletions
|
@ -1,13 +1,13 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016-2021 Dirk Brenken (dev@brenken.org)
|
# Copyright (c) 2016-2022 Dirk Brenken (dev@brenken.org)
|
||||||
# This is free software, licensed under the GNU General Public License v3.
|
# This is free software, licensed under the GNU General Public License v3.
|
||||||
#
|
#
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=travelmate
|
PKG_NAME:=travelmate
|
||||||
PKG_VERSION:=2.0.7
|
PKG_VERSION:=2.0.8
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=1
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# travelmate, a wlan connection manager for travel router
|
# travelmate, a wlan connection manager for travel router
|
||||||
# Copyright (c) 2016-2021 Dirk Brenken (dev@brenken.org)
|
# Copyright (c) 2016-2022 Dirk Brenken (dev@brenken.org)
|
||||||
# This is free software, licensed under the GNU General Public License v3.
|
# This is free software, licensed under the GNU General Public License v3.
|
||||||
|
|
||||||
# set (s)hellcheck exceptions
|
# set (s)hellcheck exceptions
|
||||||
|
@ -10,7 +10,7 @@ export LC_ALL=C
|
||||||
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
trm_ver="2.0.7"
|
trm_ver="2.0.8"
|
||||||
trm_enabled="0"
|
trm_enabled="0"
|
||||||
trm_debug="0"
|
trm_debug="0"
|
||||||
trm_iface=""
|
trm_iface=""
|
||||||
|
@ -564,6 +564,7 @@ f_check() {
|
||||||
if [ "${trm_ifstatus}" = "true" ]; then
|
if [ "${trm_ifstatus}" = "true" ]; then
|
||||||
result="$(f_net)"
|
result="$(f_net)"
|
||||||
if [ "${trm_captive}" = "1" ]; then
|
if [ "${trm_captive}" = "1" ]; then
|
||||||
|
while true; do
|
||||||
cp_domain="$(printf "%s" "${result}" | awk -F '['\''| ]' '/^net cp/{printf "%s",$4}')"
|
cp_domain="$(printf "%s" "${result}" | awk -F '['\''| ]' '/^net cp/{printf "%s",$4}')"
|
||||||
if [ -x "/etc/init.d/dnsmasq" ] && [ -f "/etc/config/dhcp" ] &&
|
if [ -x "/etc/init.d/dnsmasq" ] && [ -f "/etc/config/dhcp" ] &&
|
||||||
[ -n "${cp_domain}" ] && ! uci_get "dhcp" "@dnsmasq[0]" "rebind_domain" | grep -q "${cp_domain}"; then
|
[ -n "${cp_domain}" ] && ! uci_get "dhcp" "@dnsmasq[0]" "rebind_domain" | grep -q "${cp_domain}"; then
|
||||||
|
@ -571,8 +572,12 @@ f_check() {
|
||||||
uci_commit "dhcp"
|
uci_commit "dhcp"
|
||||||
/etc/init.d/dnsmasq reload
|
/etc/init.d/dnsmasq reload
|
||||||
f_log "info" "captive portal domain '${cp_domain}' added to to dhcp rebind whitelist"
|
f_log "info" "captive portal domain '${cp_domain}' added to to dhcp rebind whitelist"
|
||||||
|
else
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
if [ -n "${cp_domain}" ] && [ "${trm_captive}" = "1" ]; then
|
result="$(f_net)"
|
||||||
|
done
|
||||||
|
if [ -n "${cp_domain}" ]; then
|
||||||
trm_connection="${result:-"-"}/${trm_ifquality}"
|
trm_connection="${result:-"-"}/${trm_ifquality}"
|
||||||
f_jsnup
|
f_jsnup
|
||||||
login_script="$(f_getval "script")"
|
login_script="$(f_getval "script")"
|
||||||
|
|
Loading…
Reference in a new issue