Patch 249045267: Do not send retry token on non-initial packets
diff --git a/quic/core/quic_packet_creator.cc b/quic/core/quic_packet_creator.cc index 47af951..fbc21a8 100644 --- a/quic/core/quic_packet_creator.cc +++ b/quic/core/quic_packet_creator.cc
@@ -834,7 +834,12 @@ } QuicStringPiece QuicPacketCreator::GetRetryToken() const { - return retry_token_; + if (QuicVersionHasLongHeaderLengths(framer_->transport_version()) && + HasIetfLongHeader() && + EncryptionlevelToLongHeaderType(packet_.encryption_level) == INITIAL) { + return retry_token_; + } + return QuicStringPiece(); } void QuicPacketCreator::SetRetryToken(QuicStringPiece retry_token) {