]> git.ipfire.org Git - thirdparty/pdns.git/commit
rec: Fix cache handling of ECS queries with a source length of 0 5515/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 12 Jul 2017 08:57:51 +0000 (10:57 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 22 Aug 2017 08:29:57 +0000 (10:29 +0200)
commit8a3a3822f9b1ba4bb98868bd9dac0771da391c6b
tree302511c05e8f3de2941880ed1f591981044b85df
parentca3ef7f18c2500487bfc9de090b4a2317b6dbf0a
rec: Fix cache handling of ECS queries with a source length of 0

The current behavior is to send a query without ECS information
and to cache it as a non ECS-specific entry. Unfortunately doing
so meant that we wouldn't send any further ECS-specific queries for
this (qname,qtype) since we could fallback to the non ECS-specific
cached answer.
This commit adds a new parameter, `ecs-scope-zero-addr`, allowing
to specify the address sent to ECS-whitelisted authoritative servers
in that case. If unset, the default is to take the first usable
(non-any) address in `query-local-address` then in `query-local-address6`,
and finally to use `127.0.0.1` as a last resort.
pdns/iputils.hh
pdns/pdns_recursor.cc
pdns/recursordist/docs/settings.rst
pdns/syncres.cc
pdns/syncres.hh
regression-tests.recursor-dnssec/test_ECS.py
regression-tests.recursor-dnssec/test_Interop.py