Skip to content

patch for #777: harden original CID accounting per review feedback#780

Closed
Yanmei-Liu wants to merge 1 commit into
fix_issue_776from
fix/pr777_review_fixes
Closed

patch for #777: harden original CID accounting per review feedback#780
Yanmei-Liu wants to merge 1 commit into
fix_issue_776from
fix/pr777_review_fixes

Conversation

@Yanmei-Liu
Copy link
Copy Markdown
Collaborator

Summary

Fixup for #777 — addresses review feedback on the handshake CID exclusion implementation:

  • Idempotency guard: xqc_cid_set_mark_original now checks !inner->is_original before incrementing counter, preventing silent inflation if called twice on the same CID
  • Sender-side supply alignment: xqc_conn_try_add_new_conn_id now subtracts original_cid_cnt in all three while conditions, so the endpoint correctly issues up to active_connection_id_limit non-handshake CIDs
  • Delete path coverage: xqc_cid_set_delete_cid now decrements original_cid_cnt when removing an active original CID
  • File hygiene: trailing newlines added to xqc_cid_test.c and xqc_cid_test.h

Test plan

  • Existing xqc_test_cid_handshake_exclusion passes (no behavioral regression — guard only activates on double-call which doesn't occur in current tests)
  • xqc_test_cid_active_limit passes (sender-side change is consistent with receiver-side fix)
  • Full test suite: sh scripts/xquic_test.sh

Fixes review comments on #777.

- Add idempotency guard to xqc_cid_set_mark_original to prevent
  double-counting if called multiple times on the same CID
- Exclude original_cid_cnt from sender-side supply check in
  xqc_conn_try_add_new_conn_id so we issue the correct number of NCIDs
- Handle original_cid_cnt decrement in xqc_cid_set_delete_cid path
- Fix missing trailing newlines in test files
@Yanmei-Liu Yanmei-Liu changed the title [~] #776 harden original CID accounting per review feedback fix issue 776: harden original CID accounting per review feedback May 26, 2026
@Yanmei-Liu Yanmei-Liu changed the title fix issue 776: harden original CID accounting per review feedback patch for #777: harden original CID accounting per review feedback May 26, 2026
@Yanmei-Liu Yanmei-Liu requested a review from dreamwind1985 May 26, 2026 15:42
@Yanmei-Liu
Copy link
Copy Markdown
Collaborator Author

Close. Fix at original PR.

@Yanmei-Liu Yanmei-Liu closed this May 27, 2026
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.

1 participant