From patchwork Sun Jan 7 23:52:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 1595 Return-Path: Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.ipfire.org (Postfix) with ESMTP id A7F5260D8C for ; Sun, 7 Jan 2018 13:58:53 +0100 (CET) Received: from mail01.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 2A740281F; Sun, 7 Jan 2018 13:58:53 +0100 (CET) Received: from mx.link38.eu (mx.link38.eu [188.68.43.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.link38.eu", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id F13A81017 for ; Sun, 7 Jan 2018 13:52:18 +0100 (CET) X-Virus-Scanned: ClamAV at mx.link38.eu Received: from mx-fra.brokers.link38.eu (mx-fra.brokers.link38.eu [10.141.75.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx.link38.eu (Postfix) with ESMTPS id 3BCAE4023E for ; Sun, 7 Jan 2018 13:52:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx-fra.brokers.link38.eu (Postfix) with ESMTPSA id AE1249F408 for ; Sun, 7 Jan 2018 13:52:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=link38.eu; s=201711; t=1515329532; x=1578401532; bh=aUY1M8j1ZGuVbTiU4bcIysZowo+zS+rrM53Ff9fNGNo=; h=Date:From:To:Subject:Message-ID:Content-Type:From:To:Subject:Date: Cc; b=wkTaJMB9O9C0RB4kuZ0/0DoVCc+kEd+c9NkkINwPVYUFkxQCmYwRZS7Tt093gkjWh nviphDfar7oQgjcAKjvPXnuFLCRt/lMAOzzZjkgjSnm69v7rCCNMm0l/bc6+3cSL7i MX9qfwcwDw234nIO+Q6G5+vdTACTs+Xtl6gG9EWSf7ZXE8i7ECXG5WMMFH04K/fuEU QTwQsmZyqfksCvFKZLvz3+pPKStAaov/hIFzqlIrRquHQn98X/P6lnv626yodr9ogg cb1P5SMn82L3WQJZNr1gFc/l61SEFGBLhHLRgee60krfpq/YwHOr9fJty8WVMcLZ6R 3GpUtL2sfr2mg== Date: Sun, 7 Jan 2018 13:52:11 +0100 From: Peter =?utf-8?q?M=C3=BCller?= To: "development@lists.ipfire.org" Subject: [PATCH] fix GeoIP lookup in showrequestfromcountry.dat Message-ID: <20180107135211.48b6848f.peter.mueller@link38.eu> Organization: Link38 MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" This issue was caused by the rewrite of the perl GeoIP library. Fixes #11571. Signed-off-by: Peter Müller --- 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 605873ac0..69835370b 100644 --- a/html/cgi-bin/logs.cgi/showrequestfromcountry.dat +++ b/html/cgi-bin/logs.cgi/showrequestfromcountry.dat @@ -349,7 +349,7 @@ foreach $_ (@slice) if($iface eq $country || $srcaddr ne '') { my $ccode=''; if($iface ne $country) { - $ccode = $gi->country_code_by_name($srcaddr); + $ccode = &GeoIP::lookup($srcaddr); } if($iface eq $country || $ccode eq uc($country)) { my $chain = '';