From 876f8a0f8211d0bbaf04b2117986a50d854052c9 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 11 Jul 2022 10:31:45 +0200 Subject: netwatch-dns: properly check for disabled state The property 'disabled' can be undefined, which evaluates to enabled - but is not matched by 'disabled=no'. --- netwatch-dns | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netwatch-dns b/netwatch-dns index 67e0408..82a8599 100644 --- a/netwatch-dns +++ b/netwatch-dns @@ -25,7 +25,7 @@ $ScriptLock $0; :local DnsFallback [ :toarray "" ]; :local DnsCurrent [ /ip/dns/get servers ]; -:foreach Host in=[ /tool/netwatch/find where comment~"dns" disabled=no ] do={ +:foreach Host in=[ /tool/netwatch/find where comment~"dns" !disabled ] do={ :local HostVal [ /tool/netwatch/get $Host ]; :local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ]; @@ -59,7 +59,7 @@ $ScriptLock $0; :local DohServer ""; :local DohCurrent [ /ip/dns/get use-doh-server ]; -:foreach Host in=[ /tool/netwatch/find where comment~"doh" disabled=no ] do={ +:foreach Host in=[ /tool/netwatch/find where comment~"doh" !disabled ] do={ :local HostVal [ /tool/netwatch/get $Host ]; :local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ]; -- cgit v1.2.3-70-g09d2