mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-12-03 03:40:56 +03:00
Use fresh ACK state when rebuilding ACK frames
Summary: When rebuilding outstanding packets, if the packet contains an ACK, use a fresh ACK state instead of the potentially stale one from the outstanding packet. Collateral changes: - The AckVisitor logic in processAckFrame now visits AckFrames all the time. This is to guarantee that they are visited even if they belong to cloned packets. The behavior for all other frame types remains unchanged. - If rebuilding the AckFrame is not successful, it is ignored. The rest of the clone packet is still sent. I have tried to address all the concerns that were previously raised on D27377752 Reviewed By: yangchi Differential Revision: D28659967 fbshipit-source-id: fc3c76b234a6e7140dbf038b2a8a44da8fd55bcd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7a307c4d48
commit
ffab50b5b7
@@ -228,6 +228,21 @@ ProtectionType longHeaderTypeToProtectionType(
|
||||
folly::assume_unreachable();
|
||||
}
|
||||
|
||||
PacketNumberSpace protectionTypeToPacketNumberSpace(
|
||||
ProtectionType protectionType) {
|
||||
switch (protectionType) {
|
||||
case ProtectionType::Initial:
|
||||
return PacketNumberSpace::Initial;
|
||||
case ProtectionType::Handshake:
|
||||
return PacketNumberSpace::Handshake;
|
||||
case ProtectionType::ZeroRtt:
|
||||
case ProtectionType::KeyPhaseZero:
|
||||
case ProtectionType::KeyPhaseOne:
|
||||
return PacketNumberSpace::AppData;
|
||||
}
|
||||
folly::assume_unreachable();
|
||||
}
|
||||
|
||||
ShortHeaderInvariant::ShortHeaderInvariant(ConnectionId dcid)
|
||||
: destinationConnId(std::move(dcid)) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user