Skip to content

net: tcp: Fix handling of keep-alive probes #93431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2025

Conversation

rlubos
Copy link
Contributor

@rlubos rlubos commented Jul 21, 2025

Fix processing of a received keep-alive probe and add a test case that the connection remains alive after a keep-alive exchange.

Fixes #93350

rlubos added 2 commits July 21, 2025 12:05
Keep-alive probes have seq number set to SND.NXT - 1 and may or may not
contain an octet of data. The latter case was not handled properly
therefore add a special case when validating seq number to response to
keep-alive probes.

Signed-off-by: Robert Lubos <[email protected]>
Add test verifying that if keep-alive messages are exchanged, the
connection remains alive.

Signed-off-by: Robert Lubos <[email protected]>
@rlubos
Copy link
Contributor Author

rlubos commented Jul 21, 2025

CC @shrek-wang

Copy link

@jukkar
Copy link
Member

jukkar commented Jul 28, 2025

ping @pdgendt

@pdgendt
Copy link
Contributor

pdgendt commented Jul 28, 2025

ping @pdgendt

I'm not super familiar with the TCP stack, so was hoping others could chime in. @lucasdietrich can you confirm that this fixes your issue?

@jukkar
Copy link
Member

jukkar commented Jul 28, 2025

I'm not super familiar with the TCP stack, so was hoping others could chime in

The reviewer list is short on this one so just trying to get this moving forward 😄

@lucasdietrich
Copy link
Contributor

ping @pdgendt

I'm not super familiar with the TCP stack, so was hoping others could chime in. @lucasdietrich can you confirm that this fixes your issue?

Yes, I can confirm that the patch fixes my issue. Thanks!

@cfriedt cfriedt merged commit dcbd1ed into zephyrproject-rtos:main Jul 28, 2025
43 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking area: Sockets Networking sockets backport v4.2-branch Request backport to the v4.2-branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

net: tcp: keep-alive "pings" are no longer acknowledged with v4.2.0
6 participants