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

Unified Diff: net/tools/quic/quic_packet_reader.h

Issue 1543703002: Drop packets which are larger than kMaxPacketSize, instead of closing the connection with QUIC_PACK… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110286048
Patch Set: Created 5 years 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/quic_protocol.h ('k') | net/tools/quic/quic_packet_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_packet_reader.h
diff --git a/net/tools/quic/quic_packet_reader.h b/net/tools/quic/quic_packet_reader.h
index e667d598d88423a40789a3c68e1c1952587fa38f..e020795b20602d4cc529d09ac91d54f0bbc381b4 100644
--- a/net/tools/quic/quic_packet_reader.h
+++ b/net/tools/quic/quic_packet_reader.h
@@ -61,7 +61,9 @@ class QuicPacketReader {
// cbuf_ is used for ancillary data from the kernel on recvmmsg.
char cbuf_[kSpaceForOverflowAndIp * kNumPacketsPerReadMmsgCall];
// buf_ is used for the data read from the kernel on recvmmsg.
- char buf_[2 * kMaxPacketSize * kNumPacketsPerReadMmsgCall];
+ // TODO(danzh): change it to be a pointer to avoid the allocation on the stack
+ // from exceeding maximum allowed frame size.
+ char buf_[kMaxPacketSize * kNumPacketsPerReadMmsgCall];
// iov_ and mmsg_hdr_ are used to supply cbuf and buf to the recvmmsg call.
iovec iov_[kNumPacketsPerReadMmsgCall];
mmsghdr mmsg_hdr_[kNumPacketsPerReadMmsgCall];
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/tools/quic/quic_packet_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698