Skip to content

Commit 876f8a0

Browse files
committed
netwatch-dns: properly check for disabled state
The property 'disabled' can be undefined, which evaluates to enabled - but is not matched by 'disabled=no'.
1 parent cb20b8c commit 876f8a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

netwatch-dns

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $ScriptLock $0;
2525
:local DnsFallback [ :toarray "" ];
2626
:local DnsCurrent [ /ip/dns/get servers ];
2727

28-
:foreach Host in=[ /tool/netwatch/find where comment~"dns" disabled=no ] do={
28+
:foreach Host in=[ /tool/netwatch/find where comment~"dns" !disabled ] do={
2929
:local HostVal [ /tool/netwatch/get $Host ];
3030
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
3131

@@ -59,7 +59,7 @@ $ScriptLock $0;
5959
:local DohServer "";
6060
:local DohCurrent [ /ip/dns/get use-doh-server ];
6161

62-
:foreach Host in=[ /tool/netwatch/find where comment~"doh" disabled=no ] do={
62+
:foreach Host in=[ /tool/netwatch/find where comment~"doh" !disabled ] do={
6363
:local HostVal [ /tool/netwatch/get $Host ];
6464
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
6565

0 commit comments

Comments
 (0)