Disallow invalid connection ID lengths in QUIC prober
Since we now follow the IETF spec and drop incoming packets with initial destination connection IDs shorter than 8 bytes, our prober API should not be able to generate them.
I've verified that all our callers use this API with a connection ID of length 8 so this change will not impact them.
gfe-relnote: client-only, not flag protected
PiperOrigin-RevId: 258691619
Change-Id: Ic2689216eae314efce8cab8275f93d4417d13d53
diff --git a/quic/core/quic_framer.cc b/quic/core/quic_framer.cc
index 5c9887d..e9d6fa9 100644
--- a/quic/core/quic_framer.cc
+++ b/quic/core/quic_framer.cc
@@ -6295,8 +6295,8 @@
return false;
}
if (destination_connection_id_length > kQuicMaxConnectionIdLength ||
- (destination_connection_id_length > 0 &&
- destination_connection_id_length < 4)) {
+ destination_connection_id_length <
+ kQuicMinimumInitialConnectionIdLength) {
QUIC_BUG << "Invalid connection_id_length";
return false;
}