Skip to content

Commit

Permalink
Use correct packet length when 0x20 flipping truncated packet.
Browse files Browse the repository at this point in the history
This makes no difference in practice, since only the query is
operated on, but it is more correct.

Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
simonkelley authored and DL6ER committed Feb 21, 2025
1 parent a38dce5 commit 54fcb6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dnsmasq/forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,13 +1541,13 @@ void return_reply(time_t now, struct frec *forward, struct dns_header *header, s
int first_ID = -1;

/* 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)
{
Expand Down

0 comments on commit 54fcb6e

Please sign in to comment.