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

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

Issue 144063012: Fix a QUIC bug where previously undecryptable packets were not decrypted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added logging for all frames and fixed rch's comments Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_http_stream_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/quic_framer.h" 5 #include "net/quic/quic_framer.h"
6 6
7 #include "base/containers/hash_tables.h" 7 #include "base/containers/hash_tables.h"
8 #include "net/quic/crypto/quic_decrypter.h" 8 #include "net/quic/crypto/quic_decrypter.h"
9 #include "net/quic/crypto/quic_encrypter.h" 9 #include "net/quic/crypto/quic_encrypter.h"
10 #include "net/quic/quic_data_reader.h" 10 #include "net/quic/quic_data_reader.h"
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 return false; 612 return false;
613 } 613 }
614 614
615 visitor_->OnPacketComplete(); 615 visitor_->OnPacketComplete();
616 reader_.reset(NULL); 616 reader_.reset(NULL);
617 return true; 617 return true;
618 } 618 }
619 619
620 bool QuicFramer::AppendPacketHeader(const QuicPacketHeader& header, 620 bool QuicFramer::AppendPacketHeader(const QuicPacketHeader& header,
621 QuicDataWriter* writer) { 621 QuicDataWriter* writer) {
622 DVLOG(1) << "Appending header: " << header;
622 DCHECK(header.fec_group > 0 || header.is_in_fec_group == NOT_IN_FEC_GROUP); 623 DCHECK(header.fec_group > 0 || header.is_in_fec_group == NOT_IN_FEC_GROUP);
623 uint8 public_flags = 0; 624 uint8 public_flags = 0;
624 if (header.public_header.reset_flag) { 625 if (header.public_header.reset_flag) {
625 public_flags |= PACKET_PUBLIC_FLAGS_RST; 626 public_flags |= PACKET_PUBLIC_FLAGS_RST;
626 } 627 }
627 if (header.public_header.version_flag) { 628 if (header.public_header.version_flag) {
628 public_flags |= PACKET_PUBLIC_FLAGS_VERSION; 629 public_flags |= PACKET_PUBLIC_FLAGS_VERSION;
629 } 630 }
630 631
631 public_flags |= 632 public_flags |=
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 2041
2041 bool QuicFramer::RaiseError(QuicErrorCode error) { 2042 bool QuicFramer::RaiseError(QuicErrorCode error) {
2042 DVLOG(1) << "Error detail: " << detailed_error_; 2043 DVLOG(1) << "Error detail: " << detailed_error_;
2043 set_error(error); 2044 set_error(error);
2044 visitor_->OnError(this); 2045 visitor_->OnError(this);
2045 reader_.reset(NULL); 2046 reader_.reset(NULL);
2046 return false; 2047 return false;
2047 } 2048 }
2048 2049
2049 } // namespace net 2050 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698