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

Unified Diff: net/quic/core/quic_framer.cc

Issue 2739323002: Drop Packets with the multipath bit set before decryption. Protected by FLAGS_quic_reloadable_flag_… (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_framer.cc
diff --git a/net/quic/core/quic_framer.cc b/net/quic/core/quic_framer.cc
index 977fc2f925257a33c173b3332834b980a54a36b2..68a0fb8394a53063532c7a65903a2bb08f5404a2 100644
--- a/net/quic/core/quic_framer.cc
+++ b/net/quic/core/quic_framer.cc
@@ -784,7 +784,9 @@ bool QuicFramer::ProcessPublicHeader(QuicDataReader* reader,
(public_flags & PACKET_PUBLIC_FLAGS_VERSION) != 0;
if (validate_flags_ && !public_header->version_flag &&
- public_flags > PACKET_PUBLIC_FLAGS_MAX) {
+ public_flags > (FLAGS_quic_reloadable_flag_quic_remove_multipath_bit
+ ? PACKET_PUBLIC_FLAGS_MAX_WITHOUT_MULTIPATH_FLAG
+ : PACKET_PUBLIC_FLAGS_MAX)) {
set_detailed_error("Illegal public flags value.");
return false;
}
@@ -825,7 +827,10 @@ bool QuicFramer::ProcessPublicHeader(QuicDataReader* reader,
// If not, this raises an error.
last_version_tag_ = version_tag;
QuicVersion version = QuicTagToQuicVersion(version_tag);
- if (version == quic_version_ && public_flags > PACKET_PUBLIC_FLAGS_MAX) {
+ if (version == quic_version_ &&
+ public_flags > (FLAGS_quic_reloadable_flag_quic_remove_multipath_bit
+ ? PACKET_PUBLIC_FLAGS_MAX_WITHOUT_MULTIPATH_FLAG
+ : PACKET_PUBLIC_FLAGS_MAX)) {
set_detailed_error("Illegal public flags value.");
return false;
}
« 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