Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
GeoIP backend - Hit on service's default network matching poisons the cache #6584
When using the GeoIP backend, as described on https://doc.powerdns.com/md/authoritative/backend-geoip/, we can configure services with subnet matching rules and a default matching rule.
I can send queries from all the configured subnets and I always get the correct answer.
But then, after receiving that "default matched" query, it always answer with that value for everyone, for 20 seconds (query-cache-ttl delay I guess), even for clients that should be matched against one of the configured subnet.
Command line : --config-dir=/powerdns/ --resolver=22.214.171.124:53
The service's subnet mapping should always be respected.
Query Cache is filled only when hitting the default service mapping, and the cached value is then wrongly used for the duration of query-cache-ttl.
It's the whole point of the GeoIP backend to vary the answered value based on the client's IP address.
I will try to look into the implementation code if I have some time.
added a commit
May 8, 2018
I adapted the Dockerfile to build the geoip branch.
However I get stuck further down the compilation with these issues :
If you have a working docker image or amd64 binaries/libs (with geoip) that I can use it'd be awesome.
https://builder.powerdns.com/#/builders/8/builds/2288 - in 30-40 minutes you should be able to get packages for various distributions here.