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

Unified Diff: net/quic/quic_packet_creator.cc

Issue 1562833003: relnote: Clear the FEC group in QuicPacketCreator when encryption_level is none and close the conne… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@26_CL_111359954
Patch Set: sync quic_error_map with quic_protocol Created 4 years, 11 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_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_creator.cc
diff --git a/net/quic/quic_packet_creator.cc b/net/quic/quic_packet_creator.cc
index 68f90ca7ae340920e96225fda30a3b4ad0d9040a..b6c8726dd7d8af57e499002277757d8d9fcb81ed 100644
--- a/net/quic/quic_packet_creator.cc
+++ b/net/quic/quic_packet_creator.cc
@@ -665,6 +665,12 @@ SerializedPacket QuicPacketCreator::SerializeFec(char* buffer,
// TODO(jri): Make this a public method of framer?
return NoPacket();
}
+ if (FLAGS_quic_no_unencrypted_fec &&
+ encryption_level_ == ENCRYPTION_NONE) {
+ LOG(DFATAL) << "SerializeFEC must be called with encryption.";
+ delegate_->CloseConnection(QUIC_UNENCRYPTED_FEC_DATA, false);
+ return NoPacket();
+ }
DCHECK_EQ(0u, queued_frames_.size());
QuicPacketHeader header;
FillPacketHeader(fec_group_->FecGroupNumber(), true, &header);
@@ -811,7 +817,9 @@ void QuicPacketCreator::MaybeStartFecProtection() {
void QuicPacketCreator::MaybeSendFecPacketAndCloseGroup(bool force_send_fec,
bool is_fec_timeout) {
if (ShouldSendFec(force_send_fec)) {
- if (fec_send_policy_ == FEC_ALARM_TRIGGER && !is_fec_timeout) {
+ if ((FLAGS_quic_no_unencrypted_fec &&
+ encryption_level_ == ENCRYPTION_NONE) ||
+ (fec_send_policy_ == FEC_ALARM_TRIGGER && !is_fec_timeout)) {
ResetFecGroup();
delegate_->OnResetFecGroup();
} else {
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_packet_creator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698