]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: cache SERVFAIL responses for 30s
authorLennart Poettering <lennart@poettering.net>
Wed, 15 Feb 2017 17:28:23 +0000 (18:28 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Feb 2017 09:25:15 +0000 (10:25 +0100)
commit201d99584ed7af8078bb243ce2587e5455074713
tree499106637de75c4b1f6d2838cee7ad20b27d86d9
parentdc349f5f7a833233aebd08e30e662d6298f854e3
resolved: cache SERVFAIL responses for 30s

Some domains (such as us.ynuf.alipay.com) almost appear as if they actively
want to sabotage our DNSSEC work. Specifically, they unconditionally
return SERVFAIL on SOA lookups and always only after a 1s delay (at
least). This is pretty bad for our validation logic, as we use SOA
lookups to distuingish zones from non-terminal names. Moreover, SERVFAIL
is an error that is typically returned if we send requests a server
doesn't grok, and thus is reason for us to downgrade our protocol and
try again. In case of these zones this means we'll accept the SERVFAIL
response only after a full iterative downgrade to our lowest feature
level: TCP. In combination with the 1s delays this has the effect of
making us hit our transaction timeout way to easily.

As first attempt to improve the situation: let's start caching SERVFAIL
responses in our cache, after the full downgrade for a short period of
time.

Conceptually this is exposed as "weird rcode" caching, but for now we
only consider SERVFAIL a "weird rcode" worthy of caching. Later on we
might want to add more.
src/resolve/resolved-dns-cache.c