[~] #820 fix active_connection_id_limit: only exclude self-generated CID per RFC 9000 §18.2#821
Open
dreamwind1985 wants to merge 2 commits into
Open
[~] #820 fix active_connection_id_limit: only exclude self-generated CID per RFC 9000 §18.2#821dreamwind1985 wants to merge 2 commits into
dreamwind1985 wants to merge 2 commits into
Conversation
…CID, not peer handshake CID per RFC 9000 §18.2
…connection_id_limit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per RFC 9000 §18.2,
active_connection_id_limitis the maximum number of connection IDs from the peer that an endpoint is willing to store, and it includes the connection ID received during the handshake.The previous fix (#777, commits 26f2c50 and 1db5fd5) incorrectly excluded all handshake CIDs from the limit, citing a non-existent RFC §5.1.1 quote. This caused xquic to issue too many NEW_CONNECTION_ID frames, exceeding the peer's actual limit and triggering
CONNECTION_ID_LIMIT_ERRORin nginx, ngtcp2, quiche, etc.Root Cause
xquic's dcid_set contains two handshake CIDs:
The previous fix excluded both, but only #1 should be excluded.
Fix
original_cid_cntto track only self-generated CIDs (not from the peer), not all handshake CIDsmark_originalcall for the server's SCID (pkt->pkt_scid) inxqc_conn.c, since it IS from the peer and counts toward the limitcountable_cntcomments to reference RFC 9000 §18.2 correctlyVerification
After fix, for
active_connection_id_limit=8(nginx default):countable = (unused + used) - original_cid_cnt = (7 + 2) - 1 = 8 == limitnclient_ids = 1(handshake) + 7(NCID) = 8 <= 8✓Interop test results (xquic vs nginx): 14/16 pass (2 unrelated failures, 2 unsupported)
Closes #820