Skip to content

Conversation

rlubos
Copy link
Contributor

@rlubos rlubos commented Sep 24, 2025

Just brought those regressions with the upmerge, so get the fixes ASAP.

…inal data

Add a test case for a scenario where the final data sent by one peer is
acknowledged in the FIN,ACK response from the other peer. Verify that
the acknowledgment is handled correctly, and a consecutive sequence
number sent by the TCP stack in such case is set correctly.

This complements the other existing test for FIN packet handling, which
verified that data received in a FIN packet is handled correctly. With
those tests in place it should be safer to update any logic related to
FIN packet handling.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit 99b4357)
In case FIN packed also acknowledged most recently sent data, not all
ack-related TCP context variables were updated, resulting in invalid SEQ
number values sent in consecutive packets.

Fix this by refactoring the FIN handling in TCP_ESTABLISHED state.
Instead of having a separate block strictly for FIN packet processing,
let the packet be processed by common code responsible for regular
data/ack processing. This should be less error-prone for any future
modifications or not-yet-discovered issues. Only after the common
processing of data/ack is done, we check whether FIN flag was present in
the packet, and mark the connection for closing.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit 1781505)
dns_unpack_query() no longer prepends the unpacked query with extra dot,
therefore mDNS responder needs to be aligned with this change when
parsing result and preparing response.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit 9e59229)
…ange

dns_unpack_query() no longer prepends the unpacked query with extra dot,
therefore LLMNR responder needs to be aligned with this change when
parsing result and preparing response.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit fda8247)
…_query() change

Not sure why didn't this cause the test to fail, but just for
completeness, align this test suite with dns_unpack_query() change
as well.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit c885844)
@rlubos rlubos merged commit 71628fb into nrfconnect:main Sep 24, 2025
20 checks passed
@rlubos rlubos deleted the ncs/cherry-pick-net-bugfixes-tcp-mdns branch September 24, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants