]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix for dnstap with dnscrypt and dnstap without dnsoverquic. branch-1.22.0 release-1.22.0
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 16 Oct 2024 09:52:49 +0000 (11:52 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 16 Oct 2024 09:52:49 +0000 (11:52 +0200)
doc/Changelog
util/netevent.c

index 0e5564926e2b6ff07a7485a1d3897c23f7820f9f..fde05db51292c0714112be2f4c2e37f15914ca7e 100644 (file)
@@ -2,6 +2,9 @@
        - Fix for dnsoverquic and dnstap to use the correct dnstap
          environment.
 
+16 October 2024: Wouter
+       - Fix for dnstap with dnscrypt and dnstap without dnsoverquic.
+
 14 October 2024: Wouter
        - Fix to display warning if quic-port is set but dnsoverquic is not
          enabled when compiled.
index db190b2c27c842a1c014bb1659572754709e5487..b36f00f1a2aa4f95fd31459dc465afa1ab4c812a 100644 (file)
@@ -6676,12 +6676,19 @@ comm_point_send_reply(struct comm_reply *repinfo)
 #endif
        } else {
 #ifdef USE_DNSTAP
-               struct dt_env* dtenv = repinfo->c->doq_socket
-                       ?repinfo->c->dtenv
-                       :repinfo->c->tcp_parent->dtenv;
+               struct dt_env* dtenv =
+#ifdef HAVE_NGTCP2
+                       repinfo->c->doq_socket
+                       ?repinfo->c->dtenv:
+#endif
+                       repinfo->c->tcp_parent->dtenv;
                struct sldns_buffer* dtbuffer = repinfo->c->tcp_req_info
                        ?repinfo->c->tcp_req_info->spool_buffer
                        :repinfo->c->buffer;
+#ifdef USE_DNSCRYPT
+               if(repinfo->c->dnscrypt && repinfo->is_dnscrypted)
+                       dtbuffer = repinfo->c->buffer;
+#endif
                /*
                 * sending src (client)/dst (local service) addresses over
                 * DNSTAP from other callbacks