]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Regenerate DNS transaction ID before copying packet to TCP buffer 5739/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 10 Nov 2025 09:26:25 +0000 (09:26 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 10 Nov 2025 09:38:35 +0000 (09:38 +0000)
commitc774de1a529f73d212729032ded381cc5a619359
tree1a4a5f75dd06f11af14f36a382609a1c565deb5e
parent1833877202e35b65600efcf159732f8bdeaefce9
[Fix] Regenerate DNS transaction ID before copying packet to TCP buffer

When switching from UDP to TCP (e.g., on truncated response), the code
was copying the packet to the TCP output buffer before regenerating the
transaction ID to avoid collisions. This resulted in both UDP and TCP
packets having the same transaction ID.

Fix by moving the ID regeneration and IO channel switch logic before the
memcpy to the TCP output buffer, ensuring the TCP packet contains the
updated transaction ID.
contrib/librdns/resolver.c