From patchwork Wed Apr 6 19:12:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 5456 Return-Path: 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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4KYZ0W6qHpz3x1b for ; Wed, 6 Apr 2022 19:12:59 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4KYZ0T3rYVz4Vp; Wed, 6 Apr 2022 19:12:57 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4KYZ0T3lbyz2xKQ; Wed, 6 Apr 2022 19:12:57 +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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4KYZ0Q3FBvz2xKQ for ; Wed, 6 Apr 2022 19:12:54 +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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4KYZ0Q0RHSz2cK; Wed, 6 Apr 2022 19:12:54 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1649272374; 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: in-reply-to:in-reply-to:references:references; bh=A1D9K0F81ZM/HNMVFAyCtTCB+z+o49XL1LrubQSXbnk=; b=PIWDvRCRFzI+brMVBY7mqOXAbKy6bz6WVvmjDtlsc+Gau4kFjctgw3T4XZ3z86JG4HBfW2 S6wsWctqb99SujDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1649272374; 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: in-reply-to:in-reply-to:references:references; bh=A1D9K0F81ZM/HNMVFAyCtTCB+z+o49XL1LrubQSXbnk=; b=NwTjL+eTeV1mwaZbIhlBs1N+e6ZDebx13n2IK+ChMxhQxSfFIlfxfSSbe2cR9tw8OP55At ht2AF/pWaJeaQLeEkvWQNhfp7XmkNLmGWZyVZYnWvhK9/GE2H5uC1D/wrrY+tN3yp1yAdi fYnWpchwwE+4SgBeS2MF7J+bfgHnXbDw3hSqudHNDxCBHHbH1fYG5NsHhU1T5lQ2eO8t3Q yw/OLJFIyT0iKYnaxrxnBemfJcnftTPNQIE1RtZoHgma83uzdO6a4bRPHZttVwVmdlJ9fc keAO+9lsW9+IyuN4wRfVZFmby8JbuLTiYySRXIa8JJ9hQW+wOO4WNrEwW6dbkw== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 3/3] rules.pl: Prevent from cleanup the IPSWHITELIST set. Date: Wed, 6 Apr 2022 21:12:45 +0200 Message-Id: <20220406191245.4218-3-stefan.schantl@ipfire.org> In-Reply-To: <20220406191245.4218-1-stefan.schantl@ipfire.org> References: <20220406191245.4218-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Init the IPSWHITELIST set as loaded to prevent from destroying during cleanup. Signed-off-by: Stefan Schantl --- config/firewall/rules.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl index 19dc7a6d1..0591a47be 100644 --- a/config/firewall/rules.pl +++ b/config/firewall/rules.pl @@ -73,7 +73,10 @@ my %confignatfw=(); my %locationsettings = ( "LOCATIONBLOCK_ENABLED" => "off" ); -my %ipset_loaded_sets = (); +my %ipset_loaded_sets = ( + "IPSWHITELIST" => "1", +); + my @ipset_used_sets = (); my $configfwdfw = "${General::swroot}/firewall/config";