mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
netwatch-notify: simplify the check
This commit is contained in:
parent
b1199ca50a
commit
45875ad68e
1 changed files with 1 additions and 2 deletions
|
@ -79,8 +79,7 @@ $ScriptLock $0;
|
||||||
:if ([ $IsDNSResolving ] = true) do={
|
:if ([ $IsDNSResolving ] = true) do={
|
||||||
:do {
|
:do {
|
||||||
:local Resolve [ :resolve ($HostInfo->"resolve") ];
|
:local Resolve [ :resolve ($HostInfo->"resolve") ];
|
||||||
:if ($Resolve != $HostVal->"host" && \
|
:if ([ :len [ /ip/dns/cache/find where name=($HostInfo->"resolve") data=[ :tostr ($HostVal->"host") ] ] ] = 0) do={
|
||||||
[ :len [ /ip/dns/cache/find where name=($HostInfo->"resolve") data=[ :tostr ($HostVal->"host") ] ] ] = 0) do={
|
|
||||||
$LogPrintExit2 info $0 ("Name '" . $HostInfo->"resolve" . [ $IfThenElse \
|
$LogPrintExit2 info $0 ("Name '" . $HostInfo->"resolve" . [ $IfThenElse \
|
||||||
($HostInfo->"resolve" != $HostInfo->"name") ("' for " . $Type . " '" . \
|
($HostInfo->"resolve" != $HostInfo->"name") ("' for " . $Type . " '" . \
|
||||||
$HostInfo->"name") "" ] . "' resolves to different address " . $Resolve . \
|
$HostInfo->"name") "" ] . "' resolves to different address " . $Resolve . \
|
||||||
|
|
Loading…
Reference in a new issue