Skip to content

Compliance fixes + verification paths#90

Merged
gasbytes merged 7 commits intowolfSSL:masterfrom
danielinux:fixes-20260327
Mar 27, 2026
Merged

Compliance fixes + verification paths#90
gasbytes merged 7 commits intowolfSSL:masterfrom
danielinux:fixes-20260327

Conversation

@danielinux
Copy link
Copy Markdown
Member

  • cdc4a77 DHCP: escalate failed enqueues
    Handle failed DHCP REQUEST/DISCOVER socket enqueues explicitly and add negative retry tests.
  • 064ccd8 Add test case: ip_recv() ESP unwrapping
    Add direct ip_recv() ESP transport-mode success and unwrap-failure coverage.
  • 605ed50 DNS: properly handle initial send failures
    Abort and roll back DNS query state when the first UDP send fails, with a matching unit test.
  • 5666e7e Resolve wrong value returned by getsockopt(IP_RECV_TTL)
    Make getsockopt(IP_RECVTTL) return enabled-state only instead of the last received TTL, and update tests.
  • fa94e4b Add tests proving ARP negotiation is triggered by UDP / ICMP traffic
    Add direct wolfIP_poll() tests showing UDP/ICMP ARP misses emit ARP requests and retain queued payloads.
  • 96a8d8d Added tests for non-Ethernet receive framing path
    Add focused wrapper tests for wolfIP_recv() / wolfIP_recv_ex() on non-Ethernet interfaces, including header-padding behavior and delivery.

Program next-tick retry instead of arming the DHCP retry timer.
Per BSD sockets API, this getsockopt should only return boolean
(enabled/disabled) state.

Actual TTL value can be retrieved using recvmsg() with the appropriate
flag.
Copilot AI review requested due to automatic review settings March 27, 2026 18:30
@danielinux danielinux requested a review from gasbytes March 27, 2026 18:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens network-stack correctness around option semantics and “send didn’t enqueue” failure handling, and adds targeted unit tests to cover DHCP/DNS negative paths, ESP transport-mode receive unwrapping, ARP-on-demand behavior, and non-Ethernet receive wrappers.

Changes:

  • Fix getsockopt(IP_RECVTTL) to return enabled/disabled state (not last observed TTL) and update unit tests accordingly.
  • Handle initial send/enqueue failures for DHCP REQUEST/DISCOVER and DNS queries, with new unit tests for the negative paths.
  • Add unit tests for ESP transport-mode ip_recv() unwrapping, ARP negotiation triggered by UDP/ICMP traffic, and non-Ethernet wolfIP_recv() / wolfIP_recv_ex() framing paths.

Reviewed changes

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

Show a summary per file
File Description
src/wolfip.c Adjusts socket option semantics and adds explicit failure handling/rollback for DHCP and DNS send paths.
src/test/unit/unit_tests_tcp_ack.c Adds tests validating non-Ethernet receive wrappers deliver UDP and bypass Ethernet-layer filtering.
src/test/unit/unit_tests_dns_dhcp.c Updates RECVTTL expectations; adds negative-path tests for DHCP/DNS send failures and adds ARP-miss retention tests.
src/test/unit/unit_tests_api.c Renames/updates the RECVTTL getsockopt unit test to match the enabled-state semantics.
src/test/unit/unit_esp.c Adds ip_recv() ESP transport-mode unwrap success/failure tests plus a UDP packet builder helper.
src/test/unit/unit.c Registers the newly added/renamed unit tests in the main suite.

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

Comment thread src/wolfip.c
Comment thread src/wolfip.c
@gasbytes gasbytes merged commit b9d0ac3 into wolfSSL:master Mar 27, 2026
28 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