Conversation
There was a problem hiding this comment.
Pull request overview
This PR bundles a set of protocol correctness and robustness fixes across wolfIP’s TCP, DHCP, ICMP, UDP, and DNS handling, with accompanying unit test updates to lock in regressions.
Changes:
- TCP: fast recovery/partial ACK handling updates, PAWS timestamp wrap comparison fix, allow send in CLOSE_WAIT, and add FIN_WAIT_2 timeout handling.
- DHCP: fix option u32 byte-order handling, validate BOOT_REPLY op, require server-id in OFFER/ACK, and set
secsfrom elapsed acquisition time. - ICMP/UDP/DNS: deliver inbound ICMP dest-unreach effects to TCP, correct ICMP writable-space threshold, fix FIFO space guarding for UDP/ICMP sendto, and harden DNS parsing (reject TC=1 and forward compression pointers).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/wolfip.c | Core protocol logic changes for TCP/DHCP/ICMP/UDP/DNS; adds FIN_WAIT_2 timeout, DHCP elapsed secs, and DNS/ICMP hardening. |
| src/test/unit/unit_tests_tcp_ack.c | Updates DHCP parsing tests for BOOT_REPLY and adds coverage for missing server-id/op validation. |
| src/test/unit/unit_tests_proto.c | Adds/extends regression tests for ICMP writable-space, fast recovery partial ACKs, PAWS wrap, DHCP BOOT_REQUEST NAK ignore. |
| src/test/unit/unit_tests_dns_dhcp.c | Adds tests for DHCP u32 option macros, DHCP secs field, and ICMP dest-unreach behaviors. |
| src/test/unit/unit_tests_api.c | Extends DNS name parsing tests to ensure forward compression pointers are rejected; adds TCP CLOSE_WAIT sendto test. |
| src/test/unit/unit.c | Registers newly added unit tests in the suite. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ICMP hard errors were closing TCP established connections. Also fix/split test case.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
F/1591 - allow TCP send in close-wait (
fe53230)F/1592 - Fix DHCP option byte order handling (
3329b84)F/1583 - Fix PAWS timestamp wrap comparison (
055457d)F/1584 - Fix TCP fast recovery ACK handling (
712094d)F/1585 - Handle inbound ICMP dest-unreach for TCP (
10f4014)F/1593 - fix ICMP writable-space threshold (
54a1785)F/1594 - Fix UDP and ICMP sendto FIFO guard (
7e77973)F/1586 - Reject truncated DNS UDP responses (
fb080b0)F/1587 - Add FIN_WAIT_2 socket timeout (
fdb84ae)F/1588 - Set DHCP secs from elapsed process time (
9f9becf)F/1589 - Validate DHCP reply op field (
a6661cd)F/1590 - Reject BOOT_REQUEST DHCP NAKs (
5a1ec92)F/1598 - Reject DHCP OFFER without server ID (
c33a48c)F/1600 - Reject DHCPACK packets without server ID (
e123441)F/1599 - reject forward DNS compression pointers (
9547338)