GeoIP: Add lookup function for convenience
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Nov 2017 22:32:04 +0000 (22:32 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 13 Nov 2017 22:37:19 +0000 (22:37 +0000)
commit00793c27c929b68a21c4ef07044fbbb68942a192
tree0ed34207eff673f9b56b0c2d5c4d160d8d6c03a3
parentb1ad5b8b6c0d974e63eccd5ec7ecd24894bc8283
GeoIP: Add lookup function for convenience

Instead of opening the database again for each lookup,
we will read it into memory on first use and every lookup
after that will be coming from cache.

Reviewed-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/cfgroot/geoip-functions.pl
html/cgi-bin/country.cgi
html/cgi-bin/logs.cgi/firewalllog.dat
html/cgi-bin/logs.cgi/firewalllogcountry.dat
html/cgi-bin/logs.cgi/firewalllogip.dat
html/cgi-bin/logs.cgi/showrequestfromcountry.dat