Merge pull request #21828 from stangri/master-simple-adblock

simple-adblock: bugfixes for uci_load_validate
This commit is contained in:
Stan Grishin 2023-08-16 13:42:33 -07:00 committed by GitHub
commit 06cedf9455
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=simple-adblock PKG_NAME:=simple-adblock
PKG_VERSION:=1.9.5 PKG_VERSION:=1.9.5
PKG_RELEASE:=4 PKG_RELEASE:=5
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca> PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE:=GPL-3.0-or-later

View file

@ -1393,7 +1393,7 @@ adb_start() {
fi fi
json_add_array firewall json_add_array firewall
if [ "$force_dns" -ne 0 ]; then if [ "$force_dns" -ne 0 ]; then
for c in $force_dns_port; do for c in ${force_dns_port/,/ }; do
if netstat -tuln | grep LISTEN | grep ":${c}" >/dev/null 2>&1; then if netstat -tuln | grep LISTEN | grep ":${c}" >/dev/null 2>&1; then
json_add_object "" json_add_object ""
json_add_string type redirect json_add_string type redirect
@ -1640,7 +1640,7 @@ load_validate_config() {
uci_load_validate "$packageName" "$packageName" "$1" "${2}${3:+ $3}" \ uci_load_validate "$packageName" "$packageName" "$1" "${2}${3:+ $3}" \
'enabled:bool:0' \ 'enabled:bool:0' \
'force_dns:bool:1' \ 'force_dns:bool:1' \
'force_dns_port:list(integer):"53 853"' \ 'force_dns_port:list(integer):53,853' \
'parallel_downloads:bool:1' \ 'parallel_downloads:bool:1' \
'debug:bool:0' \ 'debug:bool:0' \
'compressed_cache:bool:0' \ 'compressed_cache:bool:0' \
@ -1661,7 +1661,7 @@ load_validate_config() {
'procd_boot_wan_timeout:integer:60' \ 'procd_boot_wan_timeout:integer:60' \
'led:or("", "none", file, device, string)' \ 'led:or("", "none", file, device, string)' \
'dns:or("dnsmasq.addnhosts", "dnsmasq.conf", "dnsmasq.ipset", "dnsmasq.nftset", "dnsmasq.servers", "unbound.adb_list"):dnsmasq.servers' \ 'dns:or("dnsmasq.addnhosts", "dnsmasq.conf", "dnsmasq.ipset", "dnsmasq.nftset", "dnsmasq.servers", "unbound.adb_list"):dnsmasq.servers' \
'dns_instance:or(list(integer, string)):0' \ 'dns_instance:list(or(integer, string)):0' \
'allowed_domain:list(string)' \ 'allowed_domain:list(string)' \
'allowed_domains_url:list(string)' \ 'allowed_domains_url:list(string)' \
'blocked_domain:list(string)' \ 'blocked_domain:list(string)' \