Merge pull request #19987 from stangri/master-simple-adblock
simple-adblock: bugfix: detect dnsmasq ipset support
This commit is contained in:
commit
04c805b4ca
2 changed files with 5 additions and 5 deletions
|
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=simple-adblock
|
PKG_NAME:=simple-adblock
|
||||||
PKG_VERSION:=1.9.3
|
PKG_VERSION:=1.9.3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
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
|
||||||
|
|
||||||
|
|
|
@ -393,7 +393,7 @@ load_environment() {
|
||||||
output "$_ERROR_: $serviceName failed to discover WAN gateway.\\n"; return 1;
|
output "$_ERROR_: $serviceName failed to discover WAN gateway.\\n"; return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dnsmasq() {
|
resolver() {
|
||||||
local cfg="$1" param="$2"
|
local cfg="$1" param="$2"
|
||||||
case "$param" in
|
case "$param" in
|
||||||
dnsmasq.addnhosts)
|
dnsmasq.addnhosts)
|
||||||
|
@ -430,10 +430,10 @@ dns() {
|
||||||
|
|
||||||
config_load 'dhcp'
|
config_load 'dhcp'
|
||||||
if [ "$dns_instance" = "*" ]; then
|
if [ "$dns_instance" = "*" ]; then
|
||||||
config_foreach dnsmasq 'dnsmasq' "$dns"
|
config_foreach resolver 'dnsmasq' "$dns"
|
||||||
elif [ -n "$dns_instance" ]; then
|
elif [ -n "$dns_instance" ]; then
|
||||||
for i in $dns_instance; do
|
for i in $dns_instance; do
|
||||||
dnsmasq "@dnsmasq[$i]" "$dns" || dnsmasq "$i" "$dns"
|
resolver "@dnsmasq[$i]" "$dns" || resolver "$i" "$dns"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1426,7 +1426,7 @@ killcache() {
|
||||||
rm -f "$dnsmasqServersCache" "$dnsmasqServersGzip"
|
rm -f "$dnsmasqServersCache" "$dnsmasqServersGzip"
|
||||||
rm -f "$unboundCache" "$unboundGzip"
|
rm -f "$unboundCache" "$unboundGzip"
|
||||||
config_load 'dhcp'
|
config_load 'dhcp'
|
||||||
config_foreach dnsmasq 'dnsmasq' 'cleanup'
|
config_foreach resolver 'dnsmasq' 'cleanup'
|
||||||
uci_commit 'dhcp'
|
uci_commit 'dhcp'
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue