mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-08 09:42:06 +03:00
Pad server's first initial.
Summary: It makes some sense to pad initials from the server as well, as it will cause the handshake to fail earlier in scenarios where the PMTU is not symmetric. Reviewed By: yangchi Differential Revision: D19368832 fbshipit-source-id: fdc18af1ebe686db974df0255fb89f616b72ae29
This commit is contained in:
committed by
Facebook Github Bot
parent
6827637d45
commit
bed2041ef1
@@ -140,7 +140,7 @@ TEST_F(QuicPacketSchedulerTest, CryptoPaddingInitialPacket) {
|
||||
EXPECT_GT(builder2.remainingSpaceInPkt(), 0);
|
||||
}
|
||||
|
||||
TEST_F(QuicPacketSchedulerTest, CryptoServerInitialNotPadded) {
|
||||
TEST_F(QuicPacketSchedulerTest, CryptoServerInitialPadded) {
|
||||
QuicServerConnectionState conn;
|
||||
auto connId = getTestConnectionId();
|
||||
PacketNum nextPacketNum = getNextPacketNum(conn, PacketNumberSpace::Initial);
|
||||
@@ -159,7 +159,22 @@ TEST_F(QuicPacketSchedulerTest, CryptoServerInitialNotPadded) {
|
||||
writeDataToQuicStream(
|
||||
conn.cryptoState->initialStream, folly::IOBuf::copyBuffer("shlo"));
|
||||
scheduler.writeCryptoData(builder1);
|
||||
EXPECT_GT(builder1.remainingSpaceInPkt(), 0);
|
||||
EXPECT_EQ(builder1.remainingSpaceInPkt(), 0);
|
||||
nextPacketNum++;
|
||||
LongHeader longHeader2(
|
||||
LongHeader::Types::Initial,
|
||||
getTestConnectionId(1),
|
||||
connId,
|
||||
nextPacketNum,
|
||||
QuicVersion::MVFST);
|
||||
RegularQuicPacketBuilder builder2(
|
||||
conn.udpSendPacketLen,
|
||||
std::move(longHeader2),
|
||||
conn.ackStates.initialAckState.largestAckedByPeer);
|
||||
writeDataToQuicStream(
|
||||
conn.cryptoState->initialStream, folly::IOBuf::copyBuffer("shlo"));
|
||||
scheduler.writeCryptoData(builder2);
|
||||
EXPECT_GT(builder2.remainingSpaceInPkt(), 0);
|
||||
}
|
||||
|
||||
TEST_F(QuicPacketSchedulerTest, CryptoPaddingRetransmissionClientInitial) {
|
||||
|
Reference in New Issue
Block a user