aboutsummaryrefslogtreecommitdiffstats
path: root/netwatch-notify.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-13 09:13:39 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-05-14 11:39:46 +0200
commit4794d5d85c736011ef0935e41d7e60fc06ffb3b4 (patch)
tree4f2166ab49be9d08891537ded22553a1c5c37c9e /netwatch-notify.rsc
parentc87a7519fe03249b8dbc5da3233e593c0290095d (diff)
netwatch-notify: do not switch type when resolving
This requires RouterOS 7.15beta4.
Diffstat (limited to 'netwatch-notify.rsc')
-rw-r--r--netwatch-notify.rsc5
1 files changed, 3 insertions, 2 deletions
diff --git a/netwatch-notify.rsc b/netwatch-notify.rsc
index 17682f0..8481314 100644
--- a/netwatch-notify.rsc
+++ b/netwatch-notify.rsc
@@ -3,7 +3,7 @@
# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
-# requires RouterOS, version=7.13
+# requires RouterOS, version=7.15beta4
#
# monitor netwatch and send notifications
# https://git.eworm.de/cgit/routeros-scripts/about/doc/netwatch-notify.md
@@ -102,7 +102,8 @@
:if ([ :typeof ($HostInfo->"resolve") ] = "str") do={
:if ([ $IsDNSResolving ] = true) do={
:do {
- :local Resolve [ :resolve ($HostInfo->"resolve") ];
+ :local Resolve [ :resolve type=[ $IfThenElse ([ :typeof ($HostVal->"host" ] = "ip") \
+ "ipv4" "ipv6" ] ($HostInfo->"resolve") ];
:if ($Resolve != $HostVal->"host") do={
:if ([ $ResolveExpected $ScriptName ($HostInfo->"resolve") ($HostVal->"host") ] = false) do={
$LogPrint info $ScriptName ("Name '" . $HostInfo->"resolve" . [ $IfThenElse \