]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
optionsfw.cgi: Add default settings for newly added options.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 5 Mar 2022 18:13:39 +0000 (19:13 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 7 Mar 2022 18:45:28 +0000 (18:45 +0000)
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 <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/optionsfw.cgi

index 5611b71b7e0e2322d1da77569820365e4d6c9fa4..fbff67b2f9604ee9d0d5f37d44ddbe50a4c82fdb 100644 (file)
@@ -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'} = '';