From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernhard Bitsch To: development@lists.ipfire.org Subject: Re: [PATCH] firewalllog.dat: Fix for bug#13492 - include chain in the exported output Date: Fri, 22 Dec 2023 14:27:31 +0100 Message-ID: <0c056535-e4c7-4322-8a68-121b9ad59367@ipfire.org> In-Reply-To: <20231222123747.5917-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2547569697374685491==" List-Id: --===============2547569697374685491== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bernhard Bitsch Am 22.12.2023 um 13:37 schrieb Adolf Belka: > - The regex code does not extract out the chain and so it is missed off fro= m the log output > when it is exported. > - Changed code tested out on my vm testbed and confirmed to work and includ= e the chain in > the output. >=20 > Fixes: Bug13492 > Tested-by: Adolf Belka > Signed-off-by: Adolf Belka > --- > html/cgi-bin/logs.cgi/firewalllog.dat | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/html/cgi-bin/logs.cgi/firewalllog.dat b/html/cgi-bin/logs.cgi/= firewalllog.dat > index 467d06008..b07a4262d 100644 > --- a/html/cgi-bin/logs.cgi/firewalllog.dat > +++ b/html/cgi-bin/logs.cgi/firewalllog.dat > @@ -211,11 +211,12 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'export'}) > =20 > foreach $_ (@log) > { > - /^... (..) (..:..:..) [\w\-]+ kernel:.*(IN=3D.*)$/; > + /^... (..) (..:..:..) [\w\-]+ kernel:(.*)(IN=3D.*)$/; > my $day =3D $1; > $day =3D~ tr / /0/; > my $time =3D $cgiparams{'DAY'} ? "$2" : "$day/$2" ; > - print "$time $3\r\n"; > + my $chain =3D $3; > + print "$time $chain $4\r\n"; > =20 > } > exit 0; --===============2547569697374685491==--