aboutsummaryrefslogtreecommitdiffstats
path: root/netwatch-notify.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-02-27 17:56:08 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-02-28 23:01:43 +0100
commitc2f5272f18c2161150481b9569ee17bc2c3d2289 (patch)
tree9940e55b7f7c2c9e4467c35a301630b1e1a8b8e5 /netwatch-notify.rsc
parent45875ad68e4898d5c66ee08335e0c32fe04a95a6 (diff)
netwatch-notify: restore the check 🥴
This reverts commit 28da1da49e275fef6089a103edf6c158bbff317f. Chances are that we have to resolve a CNAME, that does not match when querying the cache. How to handle CNAME do multiple A records? 🤨
Diffstat (limited to 'netwatch-notify.rsc')
-rw-r--r--netwatch-notify.rsc3
1 files changed, 2 insertions, 1 deletions
diff --git a/netwatch-notify.rsc b/netwatch-notify.rsc
index 53ea7e3..186ac0a 100644
--- a/netwatch-notify.rsc
+++ b/netwatch-notify.rsc
@@ -79,7 +79,8 @@ $ScriptLock $0;
:if ([ $IsDNSResolving ] = true) do={
:do {
:local Resolve [ :resolve ($HostInfo->"resolve") ];
- :if ([ :len [ /ip/dns/cache/find where name=($HostInfo->"resolve") data=[ :tostr ($HostVal->"host") ] ] ] = 0) do={
+ :if ($Resolve != $HostVal->"host" && \
+ [ :len [ /ip/dns/cache/find where name=($HostInfo->"resolve") data=[ :tostr ($HostVal->"host") ] ] ] = 0) do={
$LogPrintExit2 info $0 ("Name '" . $HostInfo->"resolve" . [ $IfThenElse \
($HostInfo->"resolve" != $HostInfo->"name") ("' for " . $Type . " '" . \
$HostInfo->"name") "" ] . "' resolves to different address " . $Resolve . \