]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: enable DNS proxy mode if client wants DNSSEC
authorLennart Poettering <lennart@poettering.net>
Mon, 4 Mar 2024 17:49:49 +0000 (18:49 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Mar 2024 14:29:15 +0000 (15:29 +0100)
So far we disabled DNSSEC if local clients asked for it via DO flag if
DNSSEC=no is set. Let's instead switch to proxy mode in this case, and
thus treat client requested DO mode as a way to force proxy mode.

This means DNSSEC=no just controls whether resolved will do validation
for regular looups, but it has no effect anymore on lookups from clients
that indicated they want to do their own DNSSEC anyway.

Fixes: #19227 #23737 #25105
src/resolve/resolved-dns-stub.c

index 3748496cf96c49768c109ff7fb79a66b2d2a558c..87f7aab6e933a0ec1d3e614bbf51c1827f12821a 100644 (file)
@@ -958,8 +958,8 @@ static void dns_stub_process_query(Manager *m, DnsStubListenerExtra *l, DnsStrea
                 log_debug("Got request to DNS proxy address 127.0.0.54, enabling bypass logic.");
                 bypass = true;
                 protocol_flags = SD_RESOLVED_DNS|SD_RESOLVED_NO_ZONE; /* Turn off mDNS/LLMNR for proxy stub. */
-        } else if ((DNS_PACKET_DO(p) && DNS_PACKET_CD(p))) {
-                log_debug("Got request with DNSSEC checking disabled, enabling bypass logic.");
+        } else if (DNS_PACKET_DO(p)) {
+                log_debug("Got request with DNSSEC enabled, enabling bypass logic.");
                 bypass = true;
         }