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

Side by Side Diff: net/quic/core/quic_framer.cc

Issue 2409013002: relnote: Remove rejected packet number from public reset packet. (Closed)
Patch Set: flip the flag default to false 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/quic_framer.h" 5 #include "net/quic/core/quic_framer.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 } 459 }
460 460
461 // static 461 // static
462 QuicEncryptedPacket* QuicFramer::BuildPublicResetPacket( 462 QuicEncryptedPacket* QuicFramer::BuildPublicResetPacket(
463 const QuicPublicResetPacket& packet) { 463 const QuicPublicResetPacket& packet) {
464 DCHECK(packet.public_header.reset_flag); 464 DCHECK(packet.public_header.reset_flag);
465 465
466 CryptoHandshakeMessage reset; 466 CryptoHandshakeMessage reset;
467 reset.set_tag(kPRST); 467 reset.set_tag(kPRST);
468 reset.SetValue(kRNON, packet.nonce_proof); 468 reset.SetValue(kRNON, packet.nonce_proof);
469 reset.SetValue(kRSEQ, packet.rejected_packet_number); 469 if (!FLAGS_quic_remove_packet_number_from_public_reset) {
470 reset.SetValue(kRSEQ, packet.rejected_packet_number);
471 }
470 if (!packet.client_address.address().empty()) { 472 if (!packet.client_address.address().empty()) {
471 // packet.client_address is non-empty. 473 // packet.client_address is non-empty.
472 QuicSocketAddressCoder address_coder(packet.client_address); 474 QuicSocketAddressCoder address_coder(packet.client_address);
473 string serialized_address = address_coder.Encode(); 475 string serialized_address = address_coder.Encode();
474 if (serialized_address.empty()) { 476 if (serialized_address.empty()) {
475 return nullptr; 477 return nullptr;
476 } 478 }
477 reset.SetStringPiece(kCADR, serialized_address); 479 reset.SetStringPiece(kCADR, serialized_address);
478 } 480 }
479 const QuicData& reset_serialized = reset.GetSerialized(); 481 const QuicData& reset_serialized = reset.GetSerialized();
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after
2573 2575
2574 bool QuicFramer::RaiseError(QuicErrorCode error) { 2576 bool QuicFramer::RaiseError(QuicErrorCode error) {
2575 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) 2577 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error)
2576 << " detail: " << detailed_error_; 2578 << " detail: " << detailed_error_;
2577 set_error(error); 2579 set_error(error);
2578 visitor_->OnError(this); 2580 visitor_->OnError(this);
2579 return false; 2581 return false;
2580 } 2582 }
2581 2583
2582 } // namespace net 2584 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698