From patchwork Sat Mar 5 18:13:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 5319 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 4K9tC14wsVz3xK1 for ; Sat, 5 Mar 2022 18:13:49 +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 4K9tC00LDcz294; Sat, 5 Mar 2022 18:13:48 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4K9tBy3Gdqz2yV0; Sat, 5 Mar 2022 18:13:46 +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 4K9tBx3mBbz2xKc for ; Sat, 5 Mar 2022 18:13:45 +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 4K9tBw6HJVzQl; Sat, 5 Mar 2022 18:13:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1646504025; 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=C5msUaSED8IoS3o45D8tBjV5qxBMAugZvSb8QRrADyQ=; b=OaVMPMFDvFkl54Ck37QKxRZdzW8N+TZNsWDlJq8ZPaaJMO9ylyITA33fO8itdSfA8rwWHs ZGstRG828xyPl9Ywg9X1CP8FBHWQwnhY/yqrlzgolu6CgMpV0ZiewZr3iupGAuTooUMNjQ hsLrTotDZUweXFarS+Zin36krSxW8GDwt9X6DasoqfrwYT+8Ol9z8NfF0jcNSLWpRQdvJr SkYkaV+zjJQDIlTa9AWI2oVdt5U/bXeD/xw5m4dxeWENsvsWUtawvthBEfTs+v0Mz1RY/Z dacoN4hwkFzubcNefSHPD2T7trgOem5ESmve9Nu70KIkrPJSpeSiX0Yxj0qs0g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1646504025; 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=C5msUaSED8IoS3o45D8tBjV5qxBMAugZvSb8QRrADyQ=; b=WYTdsPgPPjA4XQoVpKqEsmrUxwqMXXdUUYXQYKijKJ9dhjMoDljprNNq1xUQ4rHAPCpPKq xeXs5IEk5WpsavBg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] optionsfw.cgi: Add default settings for newly added options. Date: Sat, 5 Mar 2022 19:13:39 +0100 Message-Id: <20220305181339.4389-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" If no settings for those features can be obtained from the settings file, set them to the following defaults. * DROPSPOOFEDMARTIAN -> on (yes) * DROPHOSTILE -> off (no - because only fresh installed systems should do this) * LOGDROPCTINVALID -> on (yes) Signed-off-by: Stefan Schantl Reviewed-by: Peter Müller --- html/cgi-bin/optionsfw.cgi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/html/cgi-bin/optionsfw.cgi b/html/cgi-bin/optionsfw.cgi index 5611b71b7..fbff67b2f 100644 --- a/html/cgi-bin/optionsfw.cgi +++ b/html/cgi-bin/optionsfw.cgi @@ -88,6 +88,15 @@ if (!$settings{'MASQUERADE_ORANGE'}) { if (!$settings{'MASQUERADE_BLUE'}) { $settings{'MASQUERADE_BLUE'} = 'on'; } +if (!$settings{'DROPSPOOFEDMARTIAN'}) { + $settings{'DROPSPOOFEDMARTIAN'} = 'on'; +} +if (!$settings{'DROPHOSTILE'}) { + $settings{'DROPHOSTILE'} = 'off'; +} +if (!$settings{'LOGDROPCTINVALID'}) { + $settings{'LOGDROPCTINVALID'} = 'on'; +} $checked{'DROPNEWNOTSYN'}{'off'} = ''; $checked{'DROPNEWNOTSYN'}{'on'} = '';