1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-24 04:01:07 +03:00

Change default zero rtt matching policy

Summary:
This is a safer default than allowing limited on the source address not matching.

While here, also change the attemptEarlyData setting to false, since 0-rtt should be opt-in.

Reviewed By: yangchi, JunqiWang

Differential Revision: D21383402

fbshipit-source-id: b60fbbbe9438861eea894cb11ccb8bae2243a174
This commit is contained in:
Matt Joras
2020-05-04 14:42:46 -07:00
committed by Facebook GitHub Bot
parent 0c5f00f0dc
commit d83d7f3024
5 changed files with 21 additions and 2 deletions

View File

@@ -28,6 +28,8 @@ TEST(DefaultAppTokenValidatorTest, TestValidParams) {
QuicServerConnectionState conn;
conn.peerAddress = folly::SocketAddress("1.2.3.4", 443);
conn.version = QuicVersion::MVFST;
conn.transportSettings.zeroRttSourceTokenMatchingPolicy =
ZeroRttSourceTokenMatchingPolicy::LIMIT_IF_NO_EXACT_MATCH;
AppToken appToken;
appToken.transportParams = createTicketTransportParameters(
@@ -54,6 +56,8 @@ TEST(
QuicServerConnectionState conn;
conn.peerAddress = folly::SocketAddress("1.2.3.4", 443);
conn.version = QuicVersion::MVFST;
conn.transportSettings.zeroRttSourceTokenMatchingPolicy =
ZeroRttSourceTokenMatchingPolicy::LIMIT_IF_NO_EXACT_MATCH;
auto initialMaxData =
conn.transportSettings.advertisedInitialConnectionWindowSize;
@@ -291,6 +295,8 @@ class SourceAddressTokenTest : public Test {
void SetUp() override {
conn_.peerAddress = folly::SocketAddress("1.2.3.4", 443);
conn_.version = QuicVersion::MVFST;
conn_.transportSettings.zeroRttSourceTokenMatchingPolicy =
ZeroRttSourceTokenMatchingPolicy::LIMIT_IF_NO_EXACT_MATCH;
appToken_.transportParams = createTicketTransportParameters(
conn_.transportSettings.idleTimeout.count(),