Increase maximum size of allowed incoming packets and remove incorrect QUIC_BUG
The current code would trigger a QUIC_BUG if we received a packet over 1452 bytes long. This CL increases that limit to 1472 and makes sure we fail gracefully by dropping the packet with error QUIC_PACKET_TOO_LARGE instead of triggering a QUIC_BUG.
gfe-relnote: minor change to handling of large packets (which we do not send), not flag protected
PiperOrigin-RevId: 242197597
Change-Id: Ia42288b44f3e26e0e28ab60485da9e0b570f2048
diff --git a/quic/core/quic_constants.h b/quic/core/quic_constants.h
index 0f8b019..e0bf4ce 100644
--- a/quic/core/quic_constants.h
+++ b/quic/core/quic_constants.h
@@ -40,6 +40,8 @@
// The maximum packet size of any QUIC packet over IPv4.
// 1500(Ethernet) - 20(IPv4 header) - 8(UDP header) = 1472.
const QuicByteCount kMaxV4PacketSize = 1472;
+// The maximum incoming packet size allowed.
+const QuicByteCount kMaxIncomingPacketSize = kMaxV4PacketSize;
// ETH_MAX_MTU - MAX(sizeof(iphdr), sizeof(ip6_hdr)) - sizeof(udphdr).
const QuicByteCount kMaxGsoPacketSize = 65535 - 40 - 8;
// Default maximum packet size used in the Linux TCP implementation.