From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter =?utf-8?q?M=C3=BCller?= 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 Message-ID: <4c85f5da-f54d-42fc-12f0-60edfc5d9a63@ipfire.org> In-Reply-To: <20210405133612.3251-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6510240721533830481==" List-Id: --===============6510240721533830481== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reviewed-by: Peter M=C3=BCller > Seems to be a code fragment has been left while switching to > libloc. Now call the right function from location-functions.pl. >=20 > Fixes #12599. >=20 > Signed-off-by: Stefan Schantl > --- > html/cgi-bin/logs.cgi/showrequestfromcountry.dat | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/html/cgi-bin/logs.cgi/showrequestfromcountry.dat b/html/cgi-bi= n/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 (($_ =3D~ /SRC\=3D(([\d]{1,3})(\.([\d]{1,3})){3})/) or ($_ =3D~ = /SRC\=3D(([0-9a-fA-F]{0,4})(\:([0-9a-fA-F]{0,4})){2,7})/)) { > my $srcaddr=3D$1; > - my $ccode =3D $gi->country_code_by_name($srcaddr); > + my $ccode =3D &Location::Functions::lookup_country_code($srcaddr); > if($ccode eq uc($country)){ > # or srcaddr matches country code > $log[$lines] =3D $_; >=20 --===============6510240721533830481==--