mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-09 10:00:57 +03:00
Set upper limits on max_packet_size from the peer.
Summary: This will limit us to standard Ethernet MTU (1500) for now, but I think that is fine. This will allow us to experiment with packet size from the client more easily. Reviewed By: yangchi Differential Revision: D20709146 fbshipit-source-id: 608463de53d4520a257052491683263e14fc9682
This commit is contained in:
committed by
Facebook GitHub Bot
parent
19e1c14afd
commit
2176f080ff
@@ -125,7 +125,7 @@ void processClientInitialParams(
|
||||
// TODO Validate active_connection_id_limit
|
||||
|
||||
if (!packetSize || *packetSize == 0) {
|
||||
packetSize = kDefaultMaxUDPPayload;
|
||||
packetSize = kDefaultUDPSendPacketLen;
|
||||
}
|
||||
if (*packetSize < kMinMaxUDPPayload) {
|
||||
throw QuicTransportException(
|
||||
@@ -165,8 +165,10 @@ void processClientInitialParams(
|
||||
ackDelayExponent.value_or(kDefaultAckDelayExponent);
|
||||
// TODO: udpSendPacketLen should also be limited by PMTU
|
||||
if (conn.transportSettings.canIgnorePathMTU) {
|
||||
conn.udpSendPacketLen =
|
||||
std::min<uint64_t>(*packetSize, kDefaultMaxUDPPayload);
|
||||
if (*packetSize > kDefaultMaxUDPPayload) {
|
||||
*packetSize = kDefaultUDPSendPacketLen;
|
||||
}
|
||||
conn.udpSendPacketLen = *packetSize;
|
||||
}
|
||||
|
||||
conn.peerActiveConnectionIdLimit =
|
||||
|
||||
Reference in New Issue
Block a user