public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Bernhard Bitsch <bbitsch@ipfire.org>
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	[thread overview]
Message-ID: <0c056535-e4c7-4322-8a68-121b9ad59367@ipfire.org> (raw)
In-Reply-To: <20231222123747.5917-1-adolf.belka@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

Reviewed-by: Bernhard Bitsch <bbitsch(a)ipfre.org>

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 from the log output
>     when it is exported.
> - Changed code tested out on my vm testbed and confirmed to work and include the chain in
>     the output.
> 
> Fixes: Bug13492
> Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
> Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
> ---
>   html/cgi-bin/logs.cgi/firewalllog.dat | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> 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'})
>   
>   	foreach $_ (@log)
>   	{
> -		/^... (..) (..:..:..) [\w\-]+ kernel:.*(IN=.*)$/;
> +		/^... (..) (..:..:..) [\w\-]+ kernel:(.*)(IN=.*)$/;
>   		my $day =  $1;
>   		$day =~ tr / /0/;
>   		my $time = $cgiparams{'DAY'} ? "$2" : "$day/$2" ;
> -		print "$time $3\r\n";
> +		my $chain = $3;
> +		print "$time $chain $4\r\n";
>   
>   	}
>   	exit 0;

      reply	other threads:[~2023-12-22 13:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-22 12:37 Adolf Belka
2023-12-22 13:27 ` Bernhard Bitsch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c056535-e4c7-4322-8a68-121b9ad59367@ipfire.org \
    --to=bbitsch@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox