From f0452891a74e99f75dd98f5b691eaf405e4b73fc Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Fri, 27 Nov 2015 12:26:46 +0200 Subject: [PATCH] Do not cache unknown responses --- modules/geoipbackend/geoipbackend.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/geoipbackend/geoipbackend.cc b/modules/geoipbackend/geoipbackend.cc index 773efacd4..db3f55a11 100644 --- a/modules/geoipbackend/geoipbackend.cc +++ b/modules/geoipbackend/geoipbackend.cc @@ -571,6 +571,8 @@ string GeoIPBackend::queryGeoIP(const string &ip, bool v6, GeoIPQueryAttribute a std::transform(ret.begin(), ret.end(), ret.begin(), ::tolower); break; } + + if (ret == "unknown") gl->netmask = (v6?128:32); // prevent caching return ret; } -- 2.40.0