Add EDE "filtered" extended error when --filter-A or --filter-AAAA act.

If a NODATA answer is returned instead of actual data for A or AAAA
queries because of the existence of --filter-A or --filter-AAAA
config options, then mark the replies with an EDE "filtered" tag.

Basic patch by Petr Menšík, tweaked by Simon Kelley to apply onto
the preceding caching patches.
This commit is contained in:
Simon Kelley
2023-03-20 18:32:14 +00:00
parent 2842972035
commit 1f0f86a0d0
5 changed files with 83 additions and 47 deletions

View File

@@ -178,7 +178,7 @@ size_t add_pseudoheader(struct dns_header *header, size_t plen, unsigned char *l
memcpy(buff, datap, rdlen);
/* now, delete OPT RR */
plen = rrfilter(header, plen, RRFILTER_EDNS0);
rrfilter(header, &plen, RRFILTER_EDNS0);
/* Now, force addition of a new one */
p = NULL;