From: Stefan Schantl <stefan.schantl@ipfire.org>
To: development@lists.ipfire.org
Cc: Stefan Schantl <stefan.schantl@ipfire.org>
Subject: [PATCH] ipblocklist-functions.pl: Allow downloading empty blocklists
Date: Sat, 24 May 2025 10:14:36 +0200 [thread overview]
Message-ID: <20250524081436.7395-1-stefan.schantl@ipfire.org> (raw)
Some blocklist providers does serve blocklists for current events or
with very limited updates. Therefore there is a chance such a blocklist
could be empty for a certain time.
This patch allows to replace an existing filled blocklist by an empty
one and vice versa.
Fixes #13804.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
config/cfgroot/ipblocklist-functions.pl | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/config/cfgroot/ipblocklist-functions.pl b/config/cfgroot/ipblocklist-functions.pl
index 665dadb4c..b2d0a1a49 100644
--- a/config/cfgroot/ipblocklist-functions.pl
+++ b/config/cfgroot/ipblocklist-functions.pl
@@ -91,8 +91,6 @@ sub get_ipset_db_file($) {
## nothing - On success
## not_modified - In case the servers responds with "Not modified" (304)
## dl_error - If the requested blocklist could not be downloaded.
-## empty_list - The downloaded blocklist is empty, or the parser was not able to parse
-## it correctly.
#
sub download_and_create_blocklist($) {
my ($list) = @_;
@@ -226,13 +224,6 @@ sub download_and_create_blocklist($) {
push(@blocklist, $address);
}
- # Check if the content could be parsed correctly and the blocklist
- # contains at least one item.
- unless(@blocklist) {
- # No entries - exit and return "empty_list".
- return "empty_list";
- }
-
# Get amount of entries in the blocklist array.
my $list_entries = scalar(@blocklist);
--
2.47.2
reply other threads:[~2025-05-24 8:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250524081436.7395-1-stefan.schantl@ipfire.org \
--to=stefan.schantl@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox