Index: net/quic/quic_framer.cc |
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc |
index 9ca8a3dcf01819ce58c64ee64277e8206cf5404b..3dd72b90d9340748f26f9e2e5a7a7e35143cc511 100644 |
--- a/net/quic/quic_framer.cc |
+++ b/net/quic/quic_framer.cc |
@@ -482,6 +482,12 @@ bool QuicFramer::ProcessPacket(const QuicEncryptedPacket& packet) { |
return RaiseError(QUIC_INVALID_PACKET_HEADER); |
} |
+ if (!visitor_->OnUnauthenticatedPublicHeader(public_header)) { |
+ // The visitor suppresses further processing of the packet. |
+ reader_.reset(NULL); |
+ return true; |
+ } |
+ |
if (is_server_ && public_header.version_flag && |
public_header.versions[0] != quic_version_) { |
if (!visitor_->OnProtocolVersionMismatch(public_header.versions[0])) { |
@@ -813,23 +819,6 @@ bool QuicFramer::ProcessPublicHeader( |
} |
// static |
-bool QuicFramer::ReadGuidFromPacket(const QuicEncryptedPacket& packet, |
- QuicGuid* guid) { |
- QuicDataReader reader(packet.data(), packet.length()); |
- uint8 public_flags; |
- if (!reader.ReadBytes(&public_flags, 1)) { |
- return false; |
- } |
- // Ensure it's an 8 byte guid. |
- if ((public_flags & PACKET_PUBLIC_FLAGS_8BYTE_GUID) != |
- PACKET_PUBLIC_FLAGS_8BYTE_GUID) { |
- return false; |
- } |
- |
- return reader.ReadUInt64(guid); |
-} |
- |
-// static |
QuicSequenceNumberLength QuicFramer::GetMinSequenceNumberLength( |
QuicPacketSequenceNumber sequence_number) { |
if (sequence_number < 1 << (PACKET_1BYTE_SEQUENCE_NUMBER * 8)) { |
@@ -1768,11 +1757,6 @@ bool QuicFramer::AppendStreamFramePayload( |
} |
// static |
-bool QuicFramer::HasVersionFlag(const QuicEncryptedPacket& packet) { |
- return packet.length() > 0 && |
- (packet.data()[0] & PACKET_PUBLIC_FLAGS_VERSION) != 0; |
-} |
- |
void QuicFramer::set_version(const QuicVersion version) { |
DCHECK(IsSupportedVersion(version)); |
quic_version_ = version; |