Skip to content

DTLS13: Fixes unnecessary client rtx and increase server robustness #10349

Open
rizlik wants to merge 4 commits intowolfSSL:masterfrom
rizlik:dtls13_rtx_fixes
Open

DTLS13: Fixes unnecessary client rtx and increase server robustness #10349
rizlik wants to merge 4 commits intowolfSSL:masterfrom
rizlik:dtls13_rtx_fixes

Conversation

@rizlik
Copy link
Copy Markdown
Contributor

@rizlik rizlik commented Apr 29, 2026

Description

After receiving HRR, client never resend CH1.
After being stateful, never reset the server expected next message sequence.

Fixes issue #10315

Copilot AI review requested due to automatic review settings April 29, 2026 12:39
@rizlik rizlik self-assigned this Apr 29, 2026
Copy link
Copy Markdown
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

Fixes DTLS 1.3 handshake retransmission/state tracking issues that could lead to cookie mismatches (HRR_COOKIE_ERROR) and handshake failure under packet loss/reordering (issue #10315).

Changes:

  • Adjust DTLS 1.3 client behavior to flush the buffered ClientHello from the RTX queue after receiving a ServerHello/HRR, preventing unnecessary CH1 retransmissions.
  • Improve DTLS 1.3 server robustness by avoiding resets of expected handshake sequencing once the server has become stateful.
  • Add targeted memio-based DTLS 1.3 regression tests for CH retransmission and fragmentation/replay-window edge cases.

Reviewed changes

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

File Description
tests/api/test_dtls.h Registers two new DTLS 1.3 regression tests in the API test list.
tests/api/test_dtls.c Adds new DTLS 1.3 memio tests covering CH2 retransmission behavior and CH fragmentation with CH1 replay injection.
src/dtls13.c Updates DTLS 1.3 RTX handling (flush/save ClientHello) and gates server sequence resets on stateless mode only.

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

Comment thread tests/api/test_dtls.c
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

MemBrowse Memory Report

No memory changes detected for:

@rizlik rizlik force-pushed the dtls13_rtx_fixes branch from 67ebe0d to 74570a2 Compare April 29, 2026 15:36
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