diff options
author | Christian Hesse <mail@eworm.de> | 2023-12-13 15:57:28 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-12-13 15:57:28 +0100 |
commit | f9528f0ac55da4ce2ef904dc10760012a68ae75a (patch) | |
tree | 0be61adee1bc66d6565c829b31e870d60a597c36 /fw-addr-lists.rsc | |
parent | db5ff00b5ae6592c7996f1044230595a8936ce92 (diff) |
fw-addr-lists: warn on possible truncation
... as fetch truncates data at about 64kB, reported in SUP-132297.
Diffstat (limited to 'fw-addr-lists.rsc')
-rw-r--r-- | fw-addr-lists.rsc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fw-addr-lists.rsc b/fw-addr-lists.rsc index 845b597..34a06bc 100644 --- a/fw-addr-lists.rsc +++ b/fw-addr-lists.rsc @@ -16,6 +16,7 @@ :global CertificateAvailable; :global EitherOr; :global LogPrintExit2; +:global LogPrintOnce; :global ScriptLock; :global WaitFullyConnected; @@ -72,6 +73,10 @@ $WaitFullyConnected; $LogPrintExit2 warning $0 ("Failed downloading list from: " . $List->"url") false; } + :if ([ :len $Data ] > 63000) do={ + $LogPrintOnce warning $0 ("The list is huge and may be truncated: " . $List->"url"); + } + :while ([ :len $Data ] != 0) do={ :local Line [ :pick $Data 0 [ :find $Data "\n" ] ]; :local Address ([ :pick $Line 0 [ $FindDelim $Line ] ] . ($List->"cidr")); |