]> git.ipfire.org Git - thirdparty/systemd.git/commit
dns-stream: only read DNS packet data if we identified the peer properly 36531/head
authorLennart Poettering <lennart@poettering.net>
Mon, 3 Mar 2025 23:17:21 +0000 (00:17 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 4 Mar 2025 12:33:53 +0000 (12:33 +0000)
commitfacc9439a76b4c3a5c273c71bd7a676e4c74778c
tree9506418b22eb70a1a9252677eedb0e5b4712fb84
parent8113361e82eea2741290f7117034d356acb3ab4d
dns-stream: only read DNS packet data if we identified the peer properly

If we use TCP fastopen to connect to a DNS server via TCP, and it
responds really quickly between our connection attempt and our immediate
check back, then we have not identified the peer yet, and will not be
able to use the peer metadata to fill in our packet info.

Let's fix that, and simply not read from the socket until identification
is complete.

Fixes: #34956
src/resolve/resolved-dns-stream.c