Skip to content

Fix remote_ip not set in UDP recvfrom#21

Merged
philljj merged 5 commits into
wolfSSL:masterfrom
danielinux:fix-udp-recvfrom
Feb 9, 2026
Merged

Fix remote_ip not set in UDP recvfrom#21
philljj merged 5 commits into
wolfSSL:masterfrom
danielinux:fix-udp-recvfrom

Conversation

@danielinux

@danielinux danielinux commented Feb 9, 2026

Copy link
Copy Markdown
Member
  • Unit test to reproduce claim from @philljj
  • Fix wolfIP_sock_recvfrom
  • Add more unit tests to check for proper arguments handling in wolfIP_sock_recvfrom()

Copilot AI review requested due to automatic review settings February 9, 2026 09:06

Copilot AI left a comment

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.

Pull request overview

Adds a new regression unit test intended to reproduce/guard the issue where a UDP socket’s remote_ip is not set after wolfIP_sock_recvfrom().

Changes:

  • Added test_udp_recvfrom_sets_remote_ip to validate that recvfrom populates both the returned from address and the socket’s ts->remote_ip.
  • Registered the new test in the tc_proto test case.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/test/unit/unit.c

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/wolfip.c Outdated
Comment thread src/wolfip.c Outdated
@danielinux danielinux requested a review from Copilot February 9, 2026 09:54

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/wolfip.c Outdated
Comment thread src/wolfip.c Outdated
Comment thread src/test/unit/unit.c
- return the remote port in network order
- return the correct error code in woldIP_sock_recvfrom()
- fixed test cases

@philljj philljj left a comment

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.

Thank you!

@philljj philljj merged commit 1ba7e03 into wolfSSL:master Feb 9, 2026
4 checks passed
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