Skip to content

Conversation

@danielinux
Copy link
Member

  • Fixed two corner cases when receiving RST TCP segments

Running unit tests via make cov now produces coverage reports.

image

+ Fixed two corner cases when receiving RST TCP segments
Copilot AI review requested due to automatic review settings February 4, 2026 07:23
Copy link
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 adds comprehensive unit test coverage and code coverage reporting capabilities to the wolfIP project. It also fixes two corner cases in RST TCP segment handling to properly handle RST packets in LISTEN and SYN_RCVD states according to RFC 793.

Changes:

  • Added mock headers for wolfSSL to enable unit testing without full wolfSSL dependency
  • Fixed TCP RST handling in LISTEN and SYN_RCVD states with appropriate test coverage
  • Added Makefile target for code coverage reports using gcovr
  • Enhanced README with structured protocol/RFC documentation table

Reviewed changes

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

Show a summary per file
File Description
src/wolfip.c Fixed TCP RST handling corner cases; refactored queue_insert checks; corrected tcp_process_ts logic; reorganized ARP function variable declarations
src/test/unit/mocks/wolfssl/wolfcrypt/settings.h Added mock header for wolfSSL settings to support unit testing
src/test/unit/mocks/wolfssl/wolfcrypt/memory.h Added mock header for wolfSSL memory functions to support unit testing
src/test/unit/mocks/wolfssl/ssl.h Added mock header for wolfSSL SSL types and functions to support unit testing
src/port/wolfssl_io.c Removed extraneous blank line for code cleanup
src/port/stm32h563/Makefile Changed CC and OBJCOPY assignment operators
README.md Restructured protocol documentation into comprehensive table format with RFC references
Makefile Added coverage build targets and platform-specific browser commands

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

danielinux and others added 5 commits February 4, 2026 08:30
  - Prefer mock wolfSSL headers in unit build
  - Fix ICMP test frame sizing to avoid overflow
  - Ensure TCP ACK/TS tests use valid buffers and option lengths
  - Avoid tcp_process_ts infinite loop in ACK test
Spotted potential null pointer dereferences.
Added specific test cases to test with null config.
@gasbytes gasbytes merged commit 4fada02 into wolfSSL:master Feb 4, 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.

2 participants