From 75ab5f751588bf8de41bf907089f4e8977463d3c Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Thu, 20 Apr 2023 19:42:34 +0300 Subject: lws: routing fixes --- localwebsite/classes/E3372.php | 9 ++++----- localwebsite/classes/MyOpenWrtUtils.php | 2 -- misc/openwrt/setup-routing.sh | 8 ++++++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/localwebsite/classes/E3372.php b/localwebsite/classes/E3372.php index 4c2f27a..a3ce80c 100644 --- a/localwebsite/classes/E3372.php +++ b/localwebsite/classes/E3372.php @@ -93,11 +93,10 @@ class E3372 const ERROR_WRONG_SESSION = 125002; const ERROR_WRONG_SESSION_TOKEN = 125003; - - private $host; - private $headers = []; - private $authorized = false; - private $useLegacyTokenAuth = false; + private string $host; + private array $headers = []; + private bool $authorized = false; + private bool $useLegacyTokenAuth = false; public function __construct(string $host, bool $legacy_token_auth = false) { $this->host = $host; diff --git a/localwebsite/classes/MyOpenWrtUtils.php b/localwebsite/classes/MyOpenWrtUtils.php index ea467db..6bdfec2 100644 --- a/localwebsite/classes/MyOpenWrtUtils.php +++ b/localwebsite/classes/MyOpenWrtUtils.php @@ -96,8 +96,6 @@ class MyOpenWrtUtils { $url .= $arguments; } - // debugLog($url); - return $url; } diff --git a/misc/openwrt/setup-routing.sh b/misc/openwrt/setup-routing.sh index 97af514..b384541 100644 --- a/misc/openwrt/setup-routing.sh +++ b/misc/openwrt/setup-routing.sh @@ -15,11 +15,15 @@ case "$1" in ;; ipset-add) - ipset add "$2" "$3" + addr="$3" + addr="${addr/_/\/}" + ipset add "$2" "$addr" ;; ipset-del) - ipset del "$2" "$3" + addr="$3" + addr="${addr/_/\/}"s + ipset del "$2" "$addr" ;; # ipset_list) -- cgit v1.2.3