Add filtering of arbitrary RR-types.

This commit is contained in:
Simon Kelley
2023-03-29 22:43:21 +01:00
parent 042c64273d
commit a3c8b75972
8 changed files with 102 additions and 90 deletions

View File

@@ -829,19 +829,8 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server
break;
}
if (rcode == NOERROR)
{
size_t modified = 0;
if (option_bool(OPT_FILTER_A))
modified = rrfilter(header, &n, RRFILTER_A);
if (option_bool(OPT_FILTER_AAAA))
modified += rrfilter(header, &n, RRFILTER_AAAA);
if (modified > 0)
ede = EDE_FILTERED;
}
if (rcode == NOERROR && rrfilter(header, &n, RRFILTER_CONF) > 0)
ede = EDE_FILTERED;
if (doctored)
cache_secure = 0;