https-dns-proxy: bugfix: race condition with dnsmasq

Signed-off-by: Stan Grishin <stangri@melmac.net>
This commit is contained in:
Stan Grishin
2021-04-11 01:30:45 +00:00
committed by Rosen Penev
parent ba1a801f74
commit 09ba055839
2 changed files with 2 additions and 2 deletions

View File

@@ -110,7 +110,7 @@ start_service() {
procd_open_data
json_add_array firewall
for c in $forceDNSPorts; do
if netstat -tuln | grep LISTEN | grep ":${c}" >/dev/null 2>&1; then
if netstat -tuln | grep 'LISTEN' | grep ":${c}" >/dev/null 2>&1 || [ "$c" = "53" ]; then
json_add_object ""
json_add_string type redirect
json_add_string target DNAT