Support LengthPrefixedConnectionIds in v99
This CL adds support for the invariants change from draft-22. It introduces a new parsing method QuicFramer::ParsePublicHeader which can parse both old and new formats, and uses it for v99 and also for all versions when gfe2_reloadable_flag_quic_use_parse_public_header is true.
gfe-relnote: change v99 encoding, protected by disabled v99 flag and by gfe2_reloadable_flag_quic_use_parse_public_header.
PiperOrigin-RevId: 260871822
Change-Id: I680d12141b2731401a818ed335af03e7c5365219
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index 59a3656..45d31be 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -980,7 +980,7 @@
const QuicStopWaitingFrame& stop_waiting);
// Sends a version negotiation packet to the peer.
- void SendVersionNegotiationPacket(bool ietf_quic);
+ void SendVersionNegotiationPacket(bool ietf_quic, bool has_length_prefix);
// Clears any accumulated frames from the last received packet.
void ClearLastFrames();
@@ -1217,6 +1217,7 @@
bool pending_version_negotiation_packet_;
// Used when pending_version_negotiation_packet_ is true.
bool send_ietf_version_negotiation_packet_;
+ bool send_version_negotiation_packet_with_prefixed_lengths_;
// When packets could not be sent because the socket was not writable,
// they are added to this list. All corresponding frames are in