Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: net/quic/quic_framer.cc

Issue 687033002: Adding an option for peers to negotiate the length of the QUIC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_1028
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_packet_creator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_framer.cc
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc
index 7e914f878c03c69e3d9000ca619970607947b5db..e2487b4bd07a5fe1cbdde60e322ddcb0c1c1bfae 100644
--- a/net/quic/quic_framer.cc
+++ b/net/quic/quic_framer.cc
@@ -883,7 +883,8 @@ bool QuicFramer::ProcessPublicHeader(
set_detailed_error("Unable to read ConnectionId.");
return false;
}
- if ((public_header->connection_id & k4ByteConnectionIdMask) !=
+ if (last_serialized_connection_id_ &&
+ (public_header->connection_id & k4ByteConnectionIdMask) !=
(last_serialized_connection_id_ & k4ByteConnectionIdMask)) {
set_detailed_error("Truncated 4 byte ConnectionId does not match "
"previous connection_id.");
@@ -898,7 +899,8 @@ bool QuicFramer::ProcessPublicHeader(
set_detailed_error("Unable to read ConnectionId.");
return false;
}
- if ((public_header->connection_id & k1ByteConnectionIdMask) !=
+ if (last_serialized_connection_id_ &&
+ (public_header->connection_id & k1ByteConnectionIdMask) !=
(last_serialized_connection_id_ & k1ByteConnectionIdMask)) {
set_detailed_error("Truncated 1 byte ConnectionId does not match "
"previous connection_id.");
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_packet_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698