resolved: when processing auxiliary DNSSEC transactions, accept those with SERVFAIL

Some upstream DNS servers return SERVFAIL if we ask them for DNSSEC RRs, which
some forwarding DNS servers pass on to us as SERVFAIL (other though as
NOERROR...). This is should not be considered a problem, as long as the domain
in question didn't have DNSSEC enabled. Hence: when making use of auxiliary
transactions accept those that return SERVFAIL.
This commit is contained in:
Lennart Poettering 2016-06-23 23:46:56 +02:00
parent 6ff01a0d64
commit b3c6b00a93
1 changed files with 5 additions and 4 deletions

View File

@ -652,14 +652,15 @@ static int dns_transaction_dnssec_ready(DnsTransaction *t) {
return 0;
case DNS_TRANSACTION_RCODE_FAILURE:
if (dt->answer_rcode != DNS_RCODE_NXDOMAIN) {
if (!IN_SET(dt->answer_rcode, DNS_RCODE_NXDOMAIN, DNS_RCODE_SERVFAIL)) {
log_debug("Auxiliary DNSSEC RR query failed with rcode=%s.", dns_rcode_to_string(dt->answer_rcode));
goto fail;
}
/* Fall-through: NXDOMAIN is good enough for us. This is because some DNS servers erronously
* return NXDOMAIN for empty non-terminals (Akamai...), and we need to handle that nicely, when
* asking for parent SOA or similar RRs to make unsigned proofs. */
/* Fall-through: NXDOMAIN/SERVFAIL is good enough for us. This is because some DNS servers
* erronously return NXDOMAIN/SERVFAIL for empty non-terminals (Akamai...) or missing DS
* records (Facebook), and we need to handle that nicely, when asking for parent SOA or similar
* RRs to make unsigned proofs. */
case DNS_TRANSACTION_SUCCESS:
/* All good. */