Conversation
F/1772
There was a problem hiding this comment.
Pull request overview
This PR bundles a set of TCP/DHCP/DNS robustness fixes in wolfip.c, primarily around state/timeout handling and correctly handling FIFO saturation or malformed/unexpected packets, with accompanying unit-test coverage additions across the existing unit test suite.
Changes:
- Harden TCP control/data handling (segment acceptability length, demux by peer/local IP, LISTEN handling, RTO retry/enqueue behavior, pure-ACK delivery under TX FIFO pressure).
- Improve DHCP and DNS correctness (close DHCP socket on bind failure, deconfigure on lease expiry/NAK, validate DNS RR class in answers).
- Add/extend unit tests covering the above regressions and edge cases.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/wolfip.c | Core fixes across UDP/TCP/DHCP/DNS paths, including FIFO push guards and multiple TCP state-machine/validation adjustments. |
| src/test/unit/unit.c | Registers new unit tests covering the added/changed behaviors. |
| src/test/unit/unit_tests_tcp_flow.c | Adds TCP flow regression tests (e.g., demux by remote IP, LISTEN SYN-ACK rejection, retransmit bookkeeping). |
| src/test/unit/unit_tests_tcp_ack.c | Adds ICMP RX FIFO-full behavior test coverage. |
| src/test/unit/unit_tests_proto.c | Updates/extends protocol-level tests for revised close state expectations and payload-pending logic. |
| src/test/unit/unit_tests_dns_dhcp.c | Adds DHCP lease expiry/NAK deconfig tests, DHCP bind-failure cleanup test, DNS class validation tests, and UDP RX FIFO-full behavior test. |
| src/test/unit/unit_tests_api.c | Adds API-level tests for connect/accept behavior when TCP TX FIFO cannot queue SYN/SYN-ACK. |
💡 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 12 out of 12 changed files in this pull request and generated 1 comment.
💡 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 12 out of 12 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d57568c to
1cce5e7
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
F/1765 - Fix unsent TCP TX payload length accounting (
c8791cb)F/1766 - Close DHCP socket on bind failure (
f867b16)F/1767 - Fix TCP socket demultiplexing by IP (
72c1770)F/1768 - Reject LISTEN SYN-ACK segments (
de1c5db)F/1769 - Deconfigure DHCP lease on expiry (
c70fb17)F/1770 - Validate DNS RR class in answers (
e0d9660)F/1771 - Count SYN in TCP segment acceptability length (
24420ed)F/1772 - Clear DHCP config on NAK (
07eda87)F/1773 - Keep FIN_WAIT_1 on repeated close (
dc47eff)F/1774 - Preserve pure ACK delivery under TX FIFO pressure (
c637f91)F/1775 - Keep FIN_WAIT_2 on repeated close (
50d575a)F/1776 - tcp: keep closing sockets in CLOSING (
69e9a12)F/1777 - Guard SYN enqueue state transitions (
a82e562)F/1778 - Guard UDP RX FIFO enqueue state (
297e7c3)F/1779 - Guard ICMP RX state on fifo push failure (
7eec386)