From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 1/3] optionsfw.cgi: Fix bug12981 - Add option to log or not log dropped hostile traffic Date: Tue, 26 Dec 2023 20:46:22 +0100 Message-ID: <20231226194624.3273192-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3269371496584811516==" List-Id: --===============3269371496584811516== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable - Added option with drop hostile section to decide if the dropped traffic sho= uld be logged or not. Fixes: bug12981 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- html/cgi-bin/optionsfw.cgi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/html/cgi-bin/optionsfw.cgi b/html/cgi-bin/optionsfw.cgi index fbff67b2f..4b2b8ef91 100644 --- a/html/cgi-bin/optionsfw.cgi +++ b/html/cgi-bin/optionsfw.cgi @@ -94,6 +94,9 @@ if (!$settings{'DROPSPOOFEDMARTIAN'}) { if (!$settings{'DROPHOSTILE'}) { $settings{'DROPHOSTILE'} =3D 'off'; } +if (!$settings{'LOGDROPHOSTILE'}) { + $settings{'LOGDROPHOSTILE'} =3D 'on'; +} if (!$settings{'LOGDROPCTINVALID'}) { $settings{'LOGDROPCTINVALID'} =3D 'on'; } @@ -125,6 +128,9 @@ $checked{'DROPSPOOFEDMARTIAN'}{$settings{'DROPSPOOFEDMART= IAN'}} =3D "checked=3D'chec $checked{'DROPHOSTILE'}{'off'} =3D ''; $checked{'DROPHOSTILE'}{'on'} =3D ''; $checked{'DROPHOSTILE'}{$settings{'DROPHOSTILE'}} =3D "checked=3D'checked'"; +$checked{'LOGDROPHOSTILE'}{'off'} =3D ''; +$checked{'LOGDROPHOSTILE'}{'on'} =3D ''; +$checked{'LOGDROPHOSTILE'}{$settings{'LOGDROPHOSTILE'}} =3D "checked=3D'chec= ked'"; $checked{'LOGDROPCTINVALID'}{'off'} =3D ''; $checked{'LOGDROPCTINVALID'}{'on'} =3D ''; $checked{'LOGDROPCTINVALID'}{$settings{'LOGDROPCTINVALID'}} =3D "checked=3D'= checked'"; @@ -293,6 +299,13 @@ END $Lang::tr{'off'} + + $Lang::tr{'log drop hostile'} + + $Lang::tr{'on'} / + $Lang::tr{'off'} + +
=20 --=20 2.43.0 --===============3269371496584811516==--