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

Unified Diff: net/quic/core/quic_packet_creator.cc

Issue 2403193003: Landing Recent QUIC changes until 9:41 AM, Oct 10, 2016 UTC-7 (Closed)
Patch Set: git cl format Created 4 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/core/quic_framer_test.cc ('k') | net/quic/core/quic_protocol.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_packet_creator.cc
diff --git a/net/quic/core/quic_packet_creator.cc b/net/quic/core/quic_packet_creator.cc
index 2b2a8c141d71a6a0cc6f03343d326b7aac8d347f..aec0aea2e52851fb14137e7cb7b59b0de6cb18a9 100644
--- a/net/quic/core/quic_packet_creator.cc
+++ b/net/quic/core/quic_packet_creator.cc
@@ -23,6 +23,9 @@ using std::pair;
using std::string;
using std::vector;
+// If true, enforce that QUIC CHLOs fit in one packet.
+bool FLAGS_quic_enforce_single_packet_chlo = true;
+
namespace net {
QuicPacketCreator::QuicPacketCreator(QuicConnectionId connection_id,
@@ -138,7 +141,8 @@ bool QuicPacketCreator::ConsumeData(QuicStreamId id,
strncmp(frame->stream_frame->data_buffer,
reinterpret_cast<const char*>(&kCHLO), sizeof(kCHLO)) == 0) {
DCHECK_EQ(static_cast<size_t>(0), iov_offset);
- if (frame->stream_frame->data_length < iov.iov->iov_len) {
+ if (FLAGS_quic_enforce_single_packet_chlo &&
+ frame->stream_frame->data_length < iov.iov->iov_len) {
const string error_details = "Client hello won't fit in a single packet.";
QUIC_BUG << error_details << " Constructed stream frame length: "
<< frame->stream_frame->data_length
« no previous file with comments | « net/quic/core/quic_framer_test.cc ('k') | net/quic/core/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698