From patchwork Tue Mar 7 12:17:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 6671 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 4PWDwn6ghzz3ww4 for ; Tue, 7 Mar 2023 12:17:45 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4PWDwl4Xqzzc6; Tue, 7 Mar 2023 12:17:43 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4PWDwl2fzhz2yYL; Tue, 7 Mar 2023 12:17:43 +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 4PWDwk1HNNz2xFl for ; Tue, 7 Mar 2023 12:17:42 +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 4PWDwj3XQxzRR; Tue, 7 Mar 2023 12:17:41 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1678191461; 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=+IqeLKEAk3z1LqajLkdUvIQKAq4gy9m3Um1baOz6pAo=; b=B3sCnFZF+Z+2ojJdIBNwh/d0OH6VaC86leEqBZUadiD2mR8KDx6FPjScviJ/0rG00j7x30 m7M+VA6d3iKfzuDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1678191461; 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=+IqeLKEAk3z1LqajLkdUvIQKAq4gy9m3Um1baOz6pAo=; b=qTd/zq+1VGINWKQEM4tSCpDV8eHmFT3TfL1TxChJZ5XpGP3qP1LDpC1227dBSxLKFlh2yd 99bL2IWE+5WydjiwbQbJ8tmewY8N85X8T3nDxHcP+UGGOzoSHbewlxV9vT7GWIBrDNuM/R 4NXi6Z/5XQexehCdfvGxT9f61pm8a84BkrXQRcjYCUSLJHrTW8uLdZmuWQzyqnAstTYnvf g5G6HYEJrrZGtQw2EDFkZkTMTDubxY8Wp3L6ikqe47Ejsl1wlpyRoafLZ6K9s+aoSaVejn y5Y9sRkHp5UBuq1o/GYy1/Cio5mPrGIDgaGjxo9XDdKO+20Z1LzPvWGSSLqFpg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 1/2] firewall: Silence warnings if blocklist logging is not set. Date: Tue, 7 Mar 2023 13:17:34 +0100 Message-Id: <20230307121735.6485-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" Reference: #12979. Signed-off-by: Stefan Schantl --- config/firewall/rules.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl index 1b628df16..80985ca53 100644 --- a/config/firewall/rules.pl +++ b/config/firewall/rules.pl @@ -761,7 +761,7 @@ sub ipblocklist () { } # Check if logging is enabled. - if($blocklistsettings{'LOGGING'} eq "on") { + if($blocklistsettings{'LOGGING'}) && ($blocklistsettings{'LOGGING'} eq "on")) { # Create logging rule. run("$IPTABLES -A ${blocklist}_DROP -j LOG -m limit --limit 10/second --log-prefix \"BLKLST_$blocklist \""); }