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

Unified Diff: net/quic/quic_packet_creator.cc

Issue 1497863005: Retransmit non-crypto packets with forward secure encryption if the connection has gone forward sec… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@108743696
Patch Set: Created 5 years 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 | « no previous file | 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 5d40e23dda0ae5d635c9fc25efa97873e22ace87..32f810de9e049e5dd432dfcb242617f6d1fb3989 100644
--- a/net/quic/quic_packet_creator.cc
+++ b/net/quic/quic_packet_creator.cc
@@ -416,8 +416,13 @@ SerializedPacket QuicPacketCreator::ReserializeAllFrames(
packet_number_length_ = original_length;
next_packet_number_length_ = original_length;
fec_protect_ = false;
- encryption_level_ = original_encryption_level;
needs_padding_ = frames.needs_padding();
+ // Only preserve the original encryption level if it's a handshake packet or
+ // if we haven't gone forward secure.
+ if (frames.HasCryptoHandshake() ||
+ encryption_level_ != ENCRYPTION_FORWARD_SECURE) {
+ encryption_level_ = original_encryption_level;
+ }
// Serialize the packet and restore the FEC and packet number length state.
SerializedPacket serialized_packet =
« no previous file with comments | « no previous file | net/quic/quic_packet_creator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698