From 656ee8f47f93fc9b0c19cc1695d538b41290e384 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 22 Jan 2026 10:54:21 +0100 Subject: [PATCH] netwatch-dns: use :continue in loop --- netwatch-dns.rsc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc index df2c987b..7f2f791f 100644 --- a/netwatch-dns.rsc +++ b/netwatch-dns.rsc @@ -124,7 +124,12 @@ :continue; } - :if ([ :typeof [ :find $Data "doh-check-OK" ] ] = "num") do={ + :if ([ :typeof [ :find $Data "doh-check-OK" ] ] != "num") do={ + $LogPrint warning $ScriptName ("Received unexpected response from DoH server: " . \ + ($DohServer->"doh-url")); + :continue; + } + /ip/dns/set use-doh-server=($DohServer->"doh-url") verify-doh-cert=yes; :if ([ /certificate/settings/get crl-use ] = true) do={ $LogPrintOnce warning $ScriptName ("Configured to use CRL, that can cause severe issue!"); @@ -132,10 +137,6 @@ /ip/dns/cache/flush; $LogPrint info $ScriptName ("Setting DoH server: " . ($DohServer->"doh-url")); :exit; - } else={ - $LogPrint warning $ScriptName ("Received unexpected response from DoH server: " . \ - ($DohServer->"doh-url")); - } } } do={ :global ExitOnError; $ExitOnError [ :jobname ] $Err;