SIGN IN SIGN UP

BUG/MINOR: quic: delete the wrong CIDs when post-handshake frames fail

quic_build_post_handshake_frames() registers up to three connection IDs and, on
error, deletes those in [1, max[ where <max> is the loop countdown. This has no
relation to what the call really registered: depending on which iteration
fails, the CIDs are left behind, or an unrelated one is deleted.
->next_cid_seq_num is not restored either, so a later successful retry
issues sequence numbers which are not consecutive with the ones the peer
already knows, which RFC 9000 5.1.1 forbids.

Save the sequence number before the loop, delete exactly the range this call
registered, and give the numbers back.

This should be backported as far as 2.6.
F
Frederic Lecaille committed
eefc5312f5c075025073d8fdff9299c5ac346d66
Parent: 4cad64f