:global HumanReadableNum;
:global IfThenElse;
:global LogPrint;
- :global LogPrintOnce;
- :global LogPrintVerbose;
+
:global NetMask4;
:global NetMask6;
:global ScriptLock;
}
:if ([ :len [ /log/find where topics=({"script"; "warning"}) \
- message=("\$LogPrintOnce: The message is already in log, scripting subsystem may have crashed before!") ] ] > 0) do={
- $LogPrintOnce warning $ScriptName ("Scripting subsystem may have crashed, possibly caused by us. Delaying!");
+ message=("\$LogPrint: The message is already in log, scripting subsystem may have crashed before!") ] ] > 0) do={
+ :log warning ($ScriptName . " Scripting subsystem may have crashed, possibly caused by us. Delaying!");
:delay 5m;
}
:local Branch [ $GetBranch $Address ];
:local TimeOut ($IPv4Addresses->$Branch->$Address);
:if ([ :typeof $TimeOut ] = "time") do={
- $LogPrintVerbose debug $ScriptName ("Renewing IPv4 address " . $Address . \
+ :log debug ($ScriptName . " Renewing IPv4 address " . $Address . \
" in list '" . $FwListName . "' with " . $TimeOut . ".");
/ip/firewall/address-list/set $Entry timeout=$TimeOut;
:set ($IPv4Addresses->$Branch->$Address);
:set CntRenew ($CntRenew + 1);
} else={
:if ($Failure = false) do={
- $LogPrintVerbose debug $ScriptName ("Removing IPv4 address " . $Address . \
+ :log debug ($ScriptName . " Removing IPv4 address " . $Address . \
" from list '" . $FwListName . ".");
/ip/firewall/address-list/remove $Entry;
:set CntRemove ($CntRemove + 1);
:local Branch [ $GetBranch $Address ];
:local TimeOut ($IPv6Addresses->$Branch->$Address);
:if ([ :typeof $TimeOut ] = "time") do={
- $LogPrintVerbose debug $ScriptName ("Renewing IPv6 address " . $Address . \
+ :log debug ($ScriptName . " Renewing IPv6 address " . $Address . \
" in list '" . $FwListName . "' with " . $TimeOut . ".");
/ipv6/firewall/address-list/set $Entry timeout=$TimeOut;
:set ($IPv6Addresses->$Branch->$Address);
:set CntRenew ($CntRenew + 1);
} else={
:if ($Failure = false) do={
- $LogPrintVerbose debug $ScriptName ("Removing IPv6 address " . $Address . \
+ :log debug ($ScriptName . " Removing IPv6 address " . $Address . \
" from list '" . $FwListName .".");
/ipv6/firewall/address-list/remove $Entry;
:set CntRemove ($CntRemove + 1);
}
:foreach BranchName,Branch in=$IPv4Addresses do={
- $LogPrintVerbose debug $ScriptName ("Handling branch: " . $BranchName);
+ :log debug ($ScriptName . " Handling branch: " . $BranchName);
:foreach Address,Timeout in=$Branch do={
- $LogPrintVerbose debug $ScriptName ("Adding IPv4 address " . $Address . \
+ :log debug ($ScriptName . " Adding IPv4 address " . $Address . \
" to list '" . $FwListName . "' with " . $Timeout . ".");
:onerror Err {
/ip/firewall/address-list/add list=$FwListName comment=$ListComment \
}
:foreach BranchName,Branch in=$IPv6Addresses do={
- $LogPrintVerbose debug $ScriptName ("Handling branch: " . $BranchName);
+ :log debug ($ScriptName . " Handling branch: " . $BranchName);
:foreach Address,Timeout in=$Branch do={
- $LogPrintVerbose debug $ScriptName ("Adding IPv6 address " . $Address . \
+ :log debug ($ScriptName . " Adding IPv6 address " . $Address . \
" to list '" . $FwListName . "' with " . $Timeout . ".");
:onerror Err {
/ipv6/firewall/address-list/add list=$FwListName comment=$ListComment \
:global GlobalFuncReady false;
# Git commit id & info, expected configuration version
-:global CommitId "main/347/81bfb1ca";
+:global CommitId "main/348/e201dbb4";
:global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 04:45:02 01.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 04:50:02 01.05.2026.";
# The variables are received right here.
:global GlobalConfVersion 138;