Skip to content

Add TCP SACK option#25

Merged
gasbytes merged 8 commits intowolfSSL:masterfrom
danielinux:TCP-SACK
Feb 13, 2026
Merged

Add TCP SACK option#25
gasbytes merged 8 commits intowolfSSL:masterfrom
danielinux:TCP-SACK

Conversation

@danielinux
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 12, 2026 14:52
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

Adds TCP Selective Acknowledgment (SACK) support to wolfIP’s TCP implementation, including option negotiation, SACK block generation, basic out-of-order (OOO) receive handling, and SACK-informed early retransmit behavior.

Changes:

  • Add TCP option parsing/building for SACK Permitted and SACK blocks, plus related TCP socket state.
  • Track small OOO receive cache to generate SACK blocks and promote data when holes close.
  • Add unit tests covering SACK advertisement/negotiation, OOO receive behavior, and SACK-driven early retransmit; update README protocol table.

Reviewed changes

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

File Description
src/wolfip.c Implements SACK option parsing/building, OOO receive cache + SACK reporting, and SACK-informed retransmit decisions.
src/test/unit/unit.c Adds unit tests validating SACK negotiation, ACK/SACK option emission, OOO handling, and retransmit behavior.
README.md Updates the protocol/features table to mention SACK and related TCP capabilities.

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

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

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


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

@danielinux danielinux requested a review from Copilot February 12, 2026 17:18
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


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

Skip retransmitting partially-acknowledged packets, as it could cause
side effects on in-flight calculation + unnecessary repeated
retransmissions.
Copy link
Contributor

@gasbytes gasbytes left a comment

Choose a reason for hiding this comment

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

lgtm, only one thing might be to add comments on top of the newly added funcs (e.g.: tcp_consume_ooo, tcp_store_ooo_segment etc...), for better docs

@danielinux danielinux requested a review from gasbytes February 13, 2026 15:47
@gasbytes gasbytes merged commit 9a85958 into wolfSSL:master Feb 13, 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