Skip to content

Comments

Fix FIN+data ACK/queue; FIN_WAIT_2 now transitions to TIME_WAIT#42

Merged
gasbytes merged 6 commits intowolfSSL:masterfrom
danielinux:fix-tcp-fin-wait
Feb 24, 2026
Merged

Fix FIN+data ACK/queue; FIN_WAIT_2 now transitions to TIME_WAIT#42
gasbytes merged 6 commits intowolfSSL:masterfrom
danielinux:fix-tcp-fin-wait

Conversation

@danielinux
Copy link
Member

fenrir H-1 + M-1

Copilot AI review requested due to automatic review settings February 23, 2026 13:06
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 pull request consolidates TCP FIN packet handling logic and adds support for the FIN_WAIT_2 to TIME_WAIT state transition. The changes aim to fix FIN packet acknowledgment when FIN arrives with payload data and ensure proper state transitions during connection teardown.

Changes:

  • Removed duplicate FIN handling code that processed FIN packets in two separate locations
  • Added FIN_WAIT_2 to TIME_WAIT state transition (previously missing)
  • Implemented special ACK calculation for FIN+data packets in ESTABLISHED state

Reviewed changes

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

File Description
src/wolfip.c Consolidated FIN handling into single block; added FIN_WAIT_2→TIME_WAIT transition; restructured ACK calculation for FIN+data packets
src/test/unit/unit.c Updated two existing tests to expect TIME_WAIT; added new test for ESTABLISHED state FIN+data handling

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

@danielinux danielinux self-assigned this Feb 23, 2026
Copilot AI review requested due to automatic review settings February 24, 2026 06: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 2 out of 2 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.

@danielinux danielinux requested a review from gasbytes February 24, 2026 06:52
@danielinux danielinux assigned gasbytes and unassigned danielinux Feb 24, 2026
Copilot AI review requested due to automatic review settings February 24, 2026 07:05
- Remove premature FIN handling; accept FIN only when in-order
- Add in-order/out-of-order FIN tests for ESTABLISHED/FIN_WAIT_1/2
- FIN_WAIT_2 now transitions to TIME_WAIT on in-order FIN
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 2 out of 2 changed files in this pull request and generated 1 comment.


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

Copilot AI review requested due to automatic review settings February 24, 2026 13:04
@danielinux danielinux requested a review from gasbytes February 24, 2026 13:09
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 2 out of 2 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.

@gasbytes gasbytes merged commit 97f2f57 into wolfSSL:master Feb 24, 2026
9 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