mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
logs.cgi/showrequestfromcountry.dat: Proper lookup country code.
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@ipfire.org> Reviewed-by: Peter Müller <peter.mueller@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
33d18031fd
commit
5ae1188589
@@ -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] = $_;
|
||||
|
||||
Reference in New Issue
Block a user