From: Stefan Schantl Date: Sat, 5 Mar 2022 18:13:39 +0000 (+0100) Subject: optionsfw.cgi: Add default settings for newly added options. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f51b0a4f527193e08d6311496d9a091691ba7a4;p=people%2Fstevee%2Fipfire-2.x.git optionsfw.cgi: Add default settings for newly added options. 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 Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/optionsfw.cgi b/html/cgi-bin/optionsfw.cgi index 5611b71b7e..fbff67b2f9 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'} = '';