Skip to content

feat(quic): implement Connection ID storage and rotation management#415

Merged
kcenon merged 4 commits into
mainfrom
feature/399-quic-connection-id-manager
Jan 11, 2026
Merged

feat(quic): implement Connection ID storage and rotation management#415
kcenon merged 4 commits into
mainfrom
feature/399-quic-connection-id-manager

Conversation

@kcenon

@kcenon kcenon commented Jan 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add connection_id_manager class for managing peer Connection IDs per RFC 9000 Section 5.1
  • Integrate CID manager into QUIC connection class for NEW_CONNECTION_ID frame processing
  • Add RETIRE_CONNECTION_ID frame generation and transmission support
  • Add comprehensive unit tests (18 new tests) covering all CID management scenarios

Changes

  • New files:

    • include/kcenon/network/protocols/quic/connection_id_manager.h: Header for CID manager
    • src/protocols/quic/connection_id_manager.cpp: Implementation of CID manager
  • Modified files:

    • connection.h/cpp: Integrate peer_cid_manager_ member and related APIs
    • CMakeLists.txt: Add new source file to build
    • test_quic_connection.cpp: Add 18 unit tests for CID management
    • CHANGELOG.md / CHANGELOG_KO.md: Document new feature

Features Implemented

  • Storage of peer-provided CIDs via NEW_CONNECTION_ID frames
  • Sequence number and retire_prior_to tracking
  • Stateless reset token validation
  • CID rotation API (rotate_peer_cid()) for path migration
  • RETIRE_CONNECTION_ID frame generation
  • Active connection ID limit enforcement from transport parameters

Test Plan

  • Run network_quic_connection_test - all 62 tests pass
  • ConnectionIdManagerTest (13 tests) - all pass
  • ConnectionPeerCidTest (5 tests) - all pass
  • Verify no regressions in existing QUIC tests

Closes #399

Implement Connection ID storage and rotation management per RFC 9000
Section 5.1. This adds a new connection_id_manager class that handles:

- Storage of peer-provided Connection IDs via NEW_CONNECTION_ID frames
- Sequence number and retire_prior_to tracking
- Stateless reset token validation
- CID rotation API for path migration
- Generation of RETIRE_CONNECTION_ID frames

Closes #399 (partial)
- Add peer_cid_manager_ member to connection class
- Initialize peer CID manager with initial destination CID
- Process NEW_CONNECTION_ID frames to store peer CIDs
- Add RETIRE_CONNECTION_ID frame transmission in build_packet
- Add active_peer_cid() and rotate_peer_cid() public APIs
- Update apply_remote_params to set active_connection_id_limit

This completes the integration of peer CID management per RFC 9000.

Closes #399 (partial)
Add comprehensive test coverage for Connection ID management:

- ConnectionIdManagerTest: 13 tests covering CID storage, retirement,
  rotation, stateless reset token validation, and error cases
- ConnectionPeerCidTest: 5 integration tests verifying connection class
  properly uses the CID manager

All tests verify RFC 9000 Section 5.1 compliance.

Closes #399
Add changelog entries for issue #399 in both English and Korean,
documenting the new connection_id_manager class and its features.
@github-actions

Copy link
Copy Markdown
Contributor

Performance Comparison

Base Branch Results

No base results

PR Branch Results

No PR results

@kcenon kcenon merged commit 8efed4c into main Jan 11, 2026
44 checks passed
@kcenon kcenon deleted the feature/399-quic-connection-id-manager branch January 11, 2026 15:41
kcenon added a commit that referenced this pull request Apr 13, 2026
…415)

* feat(quic): add connection_id_manager for peer CID storage

Implement Connection ID storage and rotation management per RFC 9000
Section 5.1. This adds a new connection_id_manager class that handles:

- Storage of peer-provided Connection IDs via NEW_CONNECTION_ID frames
- Sequence number and retire_prior_to tracking
- Stateless reset token validation
- CID rotation API for path migration
- Generation of RETIRE_CONNECTION_ID frames

Closes #399 (partial)

* feat(quic): integrate connection_id_manager into connection class

- Add peer_cid_manager_ member to connection class
- Initialize peer CID manager with initial destination CID
- Process NEW_CONNECTION_ID frames to store peer CIDs
- Add RETIRE_CONNECTION_ID frame transmission in build_packet
- Add active_peer_cid() and rotate_peer_cid() public APIs
- Update apply_remote_params to set active_connection_id_limit

This completes the integration of peer CID management per RFC 9000.

Closes #399 (partial)

* test(quic): add unit tests for connection_id_manager

Add comprehensive test coverage for Connection ID management:

- ConnectionIdManagerTest: 13 tests covering CID storage, retirement,
  rotation, stateless reset token validation, and error cases
- ConnectionPeerCidTest: 5 integration tests verifying connection class
  properly uses the CID manager

All tests verify RFC 9000 Section 5.1 compliance.

Closes #399

* docs: update changelog for QUIC Connection ID Management

Add changelog entries for issue #399 in both English and Korean,
documenting the new connection_id_manager class and its features.
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.

[QUIC] Implement Connection ID storage and rotation management

1 participant