From d17581c4c6982169d617bda52689bc96f008210d Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Fri, 21 Feb 2025 13:02:04 +0000 Subject: [PATCH] Use correct packet length when 0x20 flipping truncated packet. This makes no difference in practice, since only the query is operated on, but it is more correct. --- src/forward.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forward.c b/src/forward.c index 66b5b92..7c1bc80 100644 --- a/src/forward.c +++ b/src/forward.c @@ -1490,13 +1490,13 @@ void return_reply(time_t now, struct frec *forward, struct dns_header *header, s log_query(F_UPSTREAM, NULL, NULL, "truncated", 0); /* This gets the name back to the state it was in when we started. */ - flip_queryname(header, nn, prev, &forward->frec_src); + flip_queryname(header, new, prev, &forward->frec_src); for (src = &forward->frec_src, prev = NULL; src; prev = src, src = src->next) { /* If you didn't undertand this above, you won't understand it here either. */ if (prev) - flip_queryname(header, nn, prev, src); + flip_queryname(header, new, prev, src); if (src->fd != -1 && nn > src->udp_pkt_size) {