Skip to content

dtls: server fixes#431

Merged
philljj merged 2 commits intowolfSSL:masterfrom
rizlik:dtls-server-fixes
Apr 11, 2024
Merged

dtls: server fixes#431
philljj merged 2 commits intowolfSSL:masterfrom
rizlik:dtls-server-fixes

Conversation

@rizlik
Copy link
Copy Markdown
Contributor

@rizlik rizlik commented Apr 4, 2024

No description provided.

avoid calling wolfSSL_Accept() on a socket while peer is not set, otherwise the
SSL objects may sends messages to the wrong peer. Also, use a "connected"
udp-socket to allow receiving packets from other peers in another socket bound
to the same local address.
@philljj
Copy link
Copy Markdown
Contributor

philljj commented Apr 5, 2024

Thank you, this is a definite improvement and more robust.

Copy link
Copy Markdown
Contributor

@philljj philljj left a comment

Choose a reason for hiding this comment

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

Looks good. Just found one logging message that needs correcting.

Comment thread dtls/server-dtls-threaded.c Outdated
ret = wolfSSL_set_fd(args[i].ssl, args[i].activefd);
if (ret != SSL_SUCCESS) {
printf("error: wolfSSL_accept returned %d\n", ret);
printf("error: wolfSSL_set_dtls_fd_connected: %d\n", ret);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The error message error: wolfSSL_set_dtls_fd_connected: doesn't match the function called wolfSSL_set_fd().

@philljj philljj assigned rizlik and unassigned philljj Apr 9, 2024
@rizlik rizlik force-pushed the dtls-server-fixes branch from 8b93f53 to ae0372d Compare April 11, 2024 12:25
@rizlik
Copy link
Copy Markdown
Contributor Author

rizlik commented Apr 11, 2024

fixed error printf and improved comments

@rizlik rizlik assigned philljj and unassigned rizlik Apr 11, 2024
@philljj philljj self-requested a review April 11, 2024 14:41
@philljj philljj merged commit 7eff6cb into wolfSSL:master Apr 11, 2024
yota22721 pushed a commit to yota22721/wolfssl-examples that referenced this pull request Jan 25, 2025
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.

2 participants