Commit graph

3 commits

Author SHA1 Message Date
Grant Spence
403e979934
plugin/cache: cache now uses source query DNSSEC option for upstream refresh (#5671)
Signed-off-by: Grant Spence <gspence@redhat.com>

Signed-off-by: Grant Spence <gspence@redhat.com>
2022-10-21 11:29:04 -04:00
Chris O'Haver
002b748ccd
plugin/cache: Unset AD flag when DO is not set for cache miss (#4736)
* unset AD bit when client DO is 0

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add flag check to existing tests

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-07-09 10:53:50 +02:00
Miek Gieben
35b40a84f2
plugin/cache: Fix filtering (#4148)
The filtering of DNSSEC records in the cache plugin was not done
correctly. Also the change to introduced this bug didn't take into
account that the cache - by virtue of differentiating between DNSSEC and
no-DNSSEC - relied on not copying the data from the cache.

This change copies and then filters the data and factors the filtering
into a function that is used in two places (albeit with on ugly boolean
parameters to prevent copying things twice).

Add tests, do_test.go is moved to test/cache_test.go because the OPT
handing is done outside of the cache plugin. The core server re-attaches
the correct OPT when replying, so that makes for a better e2e test.

Added small unit test for filterRRslice and an explicit test that asks
for DNSSEC first and then plain, and vice versa to test cache behavior.

Fixes: #4146

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-09-28 07:53:00 -07:00