public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: "Peter Müller" <peter.mueller@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] logs.cgi/showrequestfromcountry.dat: Proper lookup country code.
Date: Mon, 05 Apr 2021 16:50:10 +0200	[thread overview]
Message-ID: <4c85f5da-f54d-42fc-12f0-60edfc5d9a63@ipfire.org> (raw)
In-Reply-To: <20210405133612.3251-1-stefan.schantl@ipfire.org>

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

Reviewed-by: Peter Müller <peter.mueller(a)ipfire.org>

> Seems to be a code fragment has been left while switching to
> libloc. Now call the right function from location-functions.pl.
> 
> Fixes #12599.
> 
> Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
> ---
>  html/cgi-bin/logs.cgi/showrequestfromcountry.dat | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/cgi-bin/logs.cgi/showrequestfromcountry.dat b/html/cgi-bin/logs.cgi/showrequestfromcountry.dat
> index 2a246ec60..f81994f87 100644
> --- a/html/cgi-bin/logs.cgi/showrequestfromcountry.dat
> +++ b/html/cgi-bin/logs.cgi/showrequestfromcountry.dat
> @@ -218,7 +218,7 @@ if ($multifile) {
>  				# extract ipv4 and ipv6 address
>  				elsif (($_ =~ /SRC\=(([\d]{1,3})(\.([\d]{1,3})){3})/) or ($_ =~ /SRC\=(([0-9a-fA-F]{0,4})(\:([0-9a-fA-F]{0,4})){2,7})/)) {
>  					my $srcaddr=$1;
> -					my $ccode = $gi->country_code_by_name($srcaddr);
> +					my $ccode = &Location::Functions::lookup_country_code($srcaddr);
>  					if($ccode eq uc($country)){
>  						# or srcaddr matches country code
>  						$log[$lines] = $_;
> 

      reply	other threads:[~2021-04-05 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 13:36 Stefan Schantl
2021-04-05 14:50 ` Peter Müller [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=4c85f5da-f54d-42fc-12f0-60edfc5d9a63@ipfire.org \
    --to=peter.mueller@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