]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 20:40:02 04.05.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 17:40:03 +0000 (20:40 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 17:40:03 +0000 (20:40 +0300)
html/AM-FwAddrLists.rsc
html/AM-GlobalFunc.rsc

index 4f2fa911ad4c77f50c8155fd1ddacdc42db18575..a98290dee75d7b02bbbf49699e84713b6d2c0de3 100644 (file)
@@ -83,7 +83,7 @@
     :if ($tmpIndex = false) do={
       :set tmpIndex [ :tolf [ $FetchHugeFiles $ScriptName $Url $CheckCerts ] ];
       :if ($tmpIndex = false && $I < 5) do={
-        :log warning ($ScriptName . " Failed downloading address-list index, " . $I . ". try from: " . $FwAddrListsUrl . $Index);
+        :log warning ($ScriptName . " Failed downloading address-list index, " . $I . ". try from: " . $Url);
         :delay (($I * $I) . "s");
       }
     }
         :set ListName [ :pick $List 0 $Delim ];
       }
     :log warning ($ScriptName . " Parsing address-list index entry: " . $ListName . " - Ok.");
-    :local Url ($ListsUrl . $ListName);
+    :local ListUrl ($ListsUrl . $ListName);
     :local CntAdd 0;
     :local CntRenew 0;
     :local CntRemove 0;
 
     :for I from=1 to=5 do={
       :if ($Data = false) do={
-        :set Data [ :tolf [ $FetchHugeFiles $ScriptName $Url $CheckCerts ] ];
+        :set Data [ :tolf [ $FetchHugeFiles $ScriptName $ListUrl $CheckCerts ] ];
         :if ($Data = false && $I < 5) do={
-          :log warning ($ScriptName . " Failed downloading for list '" . $ListName . "', " . $I . ". try from: " . $Url);
+          :log warning ($ScriptName . " Failed downloading for list '" . $ListName . "', " . $I . ". try from: " . $ListUrl);
           :delay (($I * $I) . "s");
         }
       }
     :if ($Data = false) do={
       :set Data "";
       :set Failure true;
-      :log warning ($ScriptName . " Failed downloading for list '" . $ListName . "' from: " . $Url);
+      :log warning ($ScriptName . " Failed downloading for list '" . $ListName . "' from: " . $ListUrl);
     } else={
-      :log debug ($ScriptName . " Downloaded " . [ $HumanReadableNum [ :len $Data ] 1024 ] . "B for list '" . $ListName . "' from: " . $Url);
+      :log debug ($ScriptName . " Downloaded " . [ $HumanReadableNum [ :len $Data ] 1024 ] . "B for list '" . $ListName . "' from: " . $ListUrl);
     }
 
     :foreach Line in=[ :deserialize $Data delimiter="\n" from=dsv options=dsv.plain ] do={
     }
 
     :foreach Entry in=[ /ip/firewall/address-list/find where \
-        list=$FwListName comment=$ListComment ] do={
+        list=$ListName comment=$ListComment ] do={
       :local Address [ /ip/firewall/address-list/get $Entry address ];
       :local Branch [ $GetBranch $Address ];
       :local TimeOut ($IPv4Addresses->$Branch->$Address);
       :if ([ :typeof $TimeOut ] = "time") do={
         :log debug ($ScriptName . " Renewing IPv4 address " . $Address . \
-            " in list '" . $FwListName . "' with " . $TimeOut . ".");
+            " in list '" . $ListName . "' with " . $TimeOut . ".");
         /ip/firewall/address-list/set $Entry timeout=$TimeOut;
         :set ($IPv4Addresses->$Branch->$Address);
         :set CntRenew ($CntRenew + 1);
       } else={
         :if ($Failure = false) do={
           :log debug ($ScriptName . " Removing IPv4 address " . $Address . \
-              " from list '" . $FwListName . ".");
+              " from list '" . $ListName . ".");
           /ip/firewall/address-list/remove $Entry;
           :set CntRemove ($CntRemove + 1);
         }
     }
 
     :foreach Entry in=[ /ipv6/firewall/address-list/find where \
-        list=$FwListName comment=$ListComment ] do={
+        list=$ListName comment=$ListComment ] do={
       :local Address [ /ipv6/firewall/address-list/get $Entry address ];
       :local Branch [ $GetBranch $Address ];
       :local TimeOut ($IPv6Addresses->$Branch->$Address);
       :if ([ :typeof $TimeOut ] = "time") do={
         :log debug ($ScriptName . " Renewing IPv6 address " . $Address . \
-            " in list '" . $FwListName . "' with " . $TimeOut . ".");
+            " in list '" . $ListName . "' with " . $TimeOut . ".");
         /ipv6/firewall/address-list/set $Entry timeout=$TimeOut;
         :set ($IPv6Addresses->$Branch->$Address);
         :set CntRenew ($CntRenew + 1);
       } else={
         :if ($Failure = false) do={
           :log debug ($ScriptName . " Removing IPv6 address " . $Address . \
-              " from list '" . $FwListName . ".");
+              " from list '" . $ListName . ".");
           /ipv6/firewall/address-list/remove $Entry;
           :set CntRemove ($CntRemove + 1);
         }
       :log debug ($ScriptName . " Handling branch: " . $BranchName);
       :foreach Address,Timeout in=$Branch do={
         :log debug ($ScriptName . " Adding IPv4 address " . $Address . \
-            " to list '" . $FwListName . "' with " . $Timeout . ".");
+            " to list '" . $ListName . "' with " . $Timeout . ".");
         :onerror Err {
-          /ip/firewall/address-list/add list=$FwListName comment=$ListComment \
+          /ip/firewall/address-list/add list=$ListName comment=$ListComment \
               address=$Address timeout=$Timeout;
           :set CntAdd ($CntAdd + 1);
         } do={
           :log warning ($ScriptName . " Failed to add IPv4 address " . $Address . \
-              " to list '" . $FwListName . "': " . $Err);
+              " to list '" . $ListName . "': " . $Err);
         }
       }
     }
       :log debug ($ScriptName . " Handling branch: " . $BranchName);
       :foreach Address,Timeout in=$Branch do={
         :log debug ($ScriptName . " Adding IPv6 address " . $Address . \
-            " to list '" . $FwListName . "' with " . $Timeout . ".");
+            " to list '" . $ListName . "' with " . $Timeout . ".");
         :onerror Err {
-          /ipv6/firewall/address-list/add list=$FwListName comment=$ListComment \
+          /ipv6/firewall/address-list/add list=$ListName comment=$ListComment \
               address=$Address timeout=$Timeout;
           :set CntAdd ($CntAdd + 1);
         } do={
           :log warning ($ScriptName . " Failed to add IPv6 address " . $Address . \
-              " to list '" . $FwListName . "': " . $Err);
+              " to list '" . $ListName . "': " . $Err);
         }
       }
     }
 
-    :log info ($ScriptName . " list: " . $FwListName . \
+    :log info ($ScriptName . " list: " . $ListName . \
         " (" . [ $HumanReadableNum ($CntAdd + $CntRenew) 1000 ] . ")" . \
         " -- added: " . [ $HumanReadableNum $CntAdd 1000 ] . \
         " - renewed: " . [ $HumanReadableNum $CntRenew 1000 ] . \
index 6dba42e26cfd26c927f3fab68e8f1e8c134d7ed8..24d0b2056e7127bcca54a2eef3d9a1933feba8c2 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/593/61326945";
+:global CommitId "main/594/09d4bb09";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 20:25:03 04.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 20:40:02 04.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 140;