fw-addr-lists: adopt changes in wording...

... to match the changes from previous commit.
This commit is contained in:
Christian Hesse 2025-05-08 09:21:03 +02:00
parent 142b0760b0
commit b807fc9e90

View file

@ -135,15 +135,15 @@
:local Branch [ $GetBranch $Address ]; :local Branch [ $GetBranch $Address ];
:local TimeOut ($IPv4Addresses->$Branch->$Address); :local TimeOut ($IPv4Addresses->$Branch->$Address);
:if ([ :typeof $TimeOut ] = "time") do={ :if ([ :typeof $TimeOut ] = "time") do={
$LogPrintVerbose debug $ScriptName ("Renewing IPv4 address in list '" . $FwListName . \ $LogPrintVerbose debug $ScriptName ("Renewing IPv4 address " . $Address . \
"' with " . $TimeOut . ": " . $Address); " in list '" . $FwListName . "' with " . $TimeOut . ".");
/ip/firewall/address-list/set $Entry timeout=$TimeOut; /ip/firewall/address-list/set $Entry timeout=$TimeOut;
:set ($IPv4Addresses->$Branch->$Address); :set ($IPv4Addresses->$Branch->$Address);
:set CntRenew ($CntRenew + 1); :set CntRenew ($CntRenew + 1);
} else={ } else={
:if ($Failure = false) do={ :if ($Failure = false) do={
$LogPrintVerbose debug $ScriptName ("Removing IPv4 address from list '" . $FwListName . \ $LogPrintVerbose debug $ScriptName ("Removing IPv4 address " . $Address . \
"': " . $Address); " from list '" . $FwListName . ".");
/ip/firewall/address-list/remove $Entry; /ip/firewall/address-list/remove $Entry;
:set CntRemove ($CntRemove + 1); :set CntRemove ($CntRemove + 1);
} }
@ -156,15 +156,15 @@
:local Branch [ $GetBranch $Address ]; :local Branch [ $GetBranch $Address ];
:local TimeOut ($IPv6Addresses->$Branch->$Address); :local TimeOut ($IPv6Addresses->$Branch->$Address);
:if ([ :typeof $TimeOut ] = "time") do={ :if ([ :typeof $TimeOut ] = "time") do={
$LogPrintVerbose debug $ScriptName ("Renewing IPv6 address in list '" . $FwListName . \ $LogPrintVerbose debug $ScriptName ("Renewing IPv6 address " . $Address . \
"' with " . $TimeOut . ": " . $Address); " in list '" . $FwListName . "' with " . $TimeOut . ".");
/ipv6/firewall/address-list/set $Entry timeout=$TimeOut; /ipv6/firewall/address-list/set $Entry timeout=$TimeOut;
:set ($IPv6Addresses->$Branch->$Address); :set ($IPv6Addresses->$Branch->$Address);
:set CntRenew ($CntRenew + 1); :set CntRenew ($CntRenew + 1);
} else={ } else={
:if ($Failure = false) do={ :if ($Failure = false) do={
$LogPrintVerbose debug $ScriptName ("Removing IPv6 address from list '" . $FwListName . \ $LogPrintVerbose debug $ScriptName ("Removing IPv6 address " . $Address . \
"': " . $Address); " from list '" . $FwListName .".");
/ipv6/firewall/address-list/remove $Entry; /ipv6/firewall/address-list/remove $Entry;
:set CntRemove ($CntRemove + 1); :set CntRemove ($CntRemove + 1);
} }
@ -174,8 +174,8 @@
:foreach BranchName,Branch in=$IPv4Addresses do={ :foreach BranchName,Branch in=$IPv4Addresses do={
$LogPrintVerbose debug $ScriptName ("Handling branch: " . $BranchName); $LogPrintVerbose debug $ScriptName ("Handling branch: " . $BranchName);
:foreach Address,Timeout in=$Branch do={ :foreach Address,Timeout in=$Branch do={
$LogPrintVerbose debug $ScriptName ("Adding IPv4 address to list '" . $FwListName . \ $LogPrintVerbose debug $ScriptName ("Adding IPv4 address " . $Address . \
"' with " . $Timeout . ": " . $Address); " to list '" . $FwListName . "' with " . $Timeout . ".");
:onerror Err { :onerror Err {
/ip/firewall/address-list/add list=$FwListName comment=$ListComment \ /ip/firewall/address-list/add list=$FwListName comment=$ListComment \
address=$Address timeout=$Timeout; address=$Address timeout=$Timeout;
@ -190,8 +190,8 @@
:foreach BranchName,Branch in=$IPv6Addresses do={ :foreach BranchName,Branch in=$IPv6Addresses do={
$LogPrintVerbose debug $ScriptName ("Handling branch: " . $BranchName); $LogPrintVerbose debug $ScriptName ("Handling branch: " . $BranchName);
:foreach Address,Timeout in=$Branch do={ :foreach Address,Timeout in=$Branch do={
$LogPrintVerbose debug $ScriptName ("Adding IPv6 address to list '" . $FwListName . \ $LogPrintVerbose debug $ScriptName ("Adding IPv6 address " . $Address . \
"' with " . $Timeout . ": " . $Address); " to list '" . $FwListName . "' with " . $Timeout . ".");
:onerror Err { :onerror Err {
/ipv6/firewall/address-list/add list=$FwListName comment=$ListComment \ /ipv6/firewall/address-list/add list=$FwListName comment=$ListComment \
address=$Address timeout=$Timeout; address=$Address timeout=$Timeout;