resolved: Don't retry queries that indicate net error
authorRonan Pigott <ronan@rjp.ie>
Thu, 25 Jul 2024 19:48:03 +0000 (12:48 -0700)
committerLuca Boccassi <bluca@debian.org>
Thu, 15 Aug 2024 12:08:37 +0000 (13:08 +0100)
This probably rarely helped anyway, but it also in some cases interferes
with auxiliary dnssec queries where the authoritative nameserver does
not support EDNS0/DNSSEC.

Fixes: ac6844460ca1 ("resolved: support RFC 8914 EDE error codes")
(cherry picked from commit cd2ce31adbfa5fb4f08267a13ace3a72e7597a2f)

src/resolve/resolved-dns-transaction.c

index 92ac0752fec117bf6a285d562d8327380a3060b7..20189f1cc7ebfc512cd08aff1ae7015f6304b8af 100644 (file)
@@ -1264,7 +1264,7 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p, bool encrypt
                                 }
 
                                 /* These codes probably indicate a transient error. Let's try again. */
-                                if (IN_SET(t->answer_ede_rcode, DNS_EDE_RCODE_NOT_READY, DNS_EDE_RCODE_NET_ERROR)) {
+                                if (t->answer_ede_rcode == DNS_EDE_RCODE_NOT_READY) {
                                         log_debug("Server returned error: %s (%s%s%s), retrying transaction.",
                                                   FORMAT_DNS_RCODE(DNS_PACKET_RCODE(p)),
                                                   FORMAT_DNS_EDE_RCODE(t->answer_ede_rcode),