Skip to content

net: tcp: Fix user_data provided to accept callback #90645

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

Conversation

rlubos
Copy link
Collaborator

@rlubos rlubos commented May 27, 2025

TCP implementation provided the parent net_context pointer to the accept callback instead of the user_data pointer registered with net_tcp_accept(). This worked fine with the socket integration, as sockets explicitly registered parent context as user_data, however it shouldn't be hardcoded like this at the TCP level.

Fixes #90639

TCP implementation provided the parent net_context pointer to the
accept callback instead of the user_data pointer registered with
net_tcp_accept(). This worked fine with the socket integration, as
sockets explicitly registered parent context as user_data, however it
shouldn't be hardcoded like this at the TCP level.

Signed-off-by: Robert Lubos <[email protected]>
@github-actions github-actions bot added area: Networking size: XS A PR changing only a single line of code labels May 27, 2025
@github-actions github-actions bot requested review from jukkar, pdgendt and ssharks May 27, 2025 08:43
Copy link

@JarmouniA JarmouniA added the bug The issue is a bug, or the PR is fixing a bug label May 27, 2025
@kartben kartben merged commit 38e00d1 into zephyrproject-rtos:main May 29, 2025
31 checks passed
@rlubos rlubos deleted the net/tcp-accept-user-data-fix branch May 29, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent net_context APIs
5 participants