]> git.ipfire.org Git - thirdparty/pdns.git/commit - pdns/dnsdist-cache.hh
dnsdist: Detect ECS collisions in the packet cache
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 25 Jun 2018 09:29:31 +0000 (11:29 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 4 Jul 2018 08:38:07 +0000 (10:38 +0200)
commit78e3ac9e621f4bb86d9ac3b2b74bfc38c805fd5a
tree64d47a469de43a6c90f0eb6170c35df9d7df1ff6
parent88b179a585ff34cc4cb10c328031cdd5307c3048
dnsdist: Detect ECS collisions in the packet cache

We did not detect a collision involving two queries for the same qname,
qtype, qclass and flags but with different ECS values hashing to the same key.
This commit adds an option to the packet cache to parse and keep the ECS value
in order to detect this kind of collisions.
It's not enabled by default because parsing the ECS value has a cost.
pdns/dnsdist-cache.cc
pdns/dnsdist-cache.hh
pdns/dnsdist-ecs.cc
pdns/dnsdist-ecs.hh
pdns/dnsdist-lua-bindings.cc
pdns/dnsdist-tcp.cc
pdns/dnsdist.cc
pdns/dnsdist.hh
pdns/dnsdistdist/docs/reference/config.rst
pdns/test-dnsdistpacketcache_cc.cc
regression-tests.dnsdist/test_Caching.py