From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4b4FTH4npHz330h for ; Sat, 24 May 2025 08:25:23 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4b4FTD1WtNz2yHY for ; Sat, 24 May 2025 08:25:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4b4FTC1Gqmz16X; Sat, 24 May 2025 08:25:19 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1748075119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fKxFL6ts0zgladu7BlRylQ9w5fb1tyXAEDgPrK/OVwc=; b=7feoWYHsFXLqkV73ageRijQA+KOMB25XsiYYcCNAFpCCftVLUxGn+ocVcbMxIIHn16KpUp qL2bR3ay+z5MkpCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1748075119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fKxFL6ts0zgladu7BlRylQ9w5fb1tyXAEDgPrK/OVwc=; b=eolnC5vuHoUNPAUffou9pMDwiR9pul/z8ceXr1w56SvUxbSOb9jY3qOPx/Hffb9Yr0MJTl BBV8Mwnx17/6pMIkVNDhzs7ekYhETEa7P7KpZM5h9orM179buO7CscE1rTy82S1InMIebE R+qDgMVJFPtWuQiSpixtQE8Ya+nwkY5ycr4Bd4/+LcuBwfVSoLyYtO02sX+iZyKXx1WPNw huiJSROAjdn2l8qEU6mIyAqqCv0Z077TOuBOKll/1whAUVeaHxf2CbYKfskb0ofh49Md5t K/Y3gaj3vx9Uu2D07v+VH6NQd6JffD6DkiuTe5kT6Puhkm0eFtVge4yFRUUD6A== From: Stefan Schantl To: development@lists.ipfire.org Cc: Stefan Schantl Subject: [PATCH] ipblocklist-functions.pl: Allow downloading empty blocklists Date: Sat, 24 May 2025 10:14:36 +0200 Message-ID: <20250524081436.7395-1-stefan.schantl@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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