Skip to content
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

Fix hanging dtls handshake if no reply #35712

Merged
merged 2 commits into from
May 27, 2021

Conversation

emillindq
Copy link
Contributor

@emillindq emillindq commented May 27, 2021

Fixes #35541

@jukkar jukkar requested a review from rlubos May 27, 2021 08:41
@jukkar jukkar added the bug The issue is a bug, or the PR is fixing a bug label May 27, 2021
@jukkar jukkar added this to the v2.6.0 milestone May 27, 2021
Copy link
Contributor

@rlubos rlubos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks 👍

@@ -563,9 +563,8 @@ static int dtls_rx(void *ctx, unsigned char *buf, size_t len,
uint32_t dtls_timeout)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the "Fixes #35541" to the commit body of "net: sockets: tls: check return code from fcntl " commit so it is easier to track what commit fixes what issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

emillindq added 2 commits May 27, 2021 13:49
Not checking return code in fcntl can result in interpreting -1 as
flags, and cause unexpected behaviour.

Fixes zephyrproject-rtos#35541

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
Zephyr sees fnctl as an alias of ioctl, and so the F_GETFL
request should be handled here as well.

Signed-off-by: Emil Lindqvist <emil@lindq.gr>
@carlescufi carlescufi merged commit 9b7d9d4 into zephyrproject-rtos:main May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Modem area: Networking bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sockets_tls: when using dtls with sara-r4 modem, handshake hangs if no reply
4 participants