1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-09 10:00:57 +03:00
Commit Graph

17 Commits

Author SHA1 Message Date
Amaury Séchet
9f91bb4b95 Move the caching of server parameters to ClientStateMachine (#109)
Summary:
All the state already moved there anyways, and this is closely related to the Psk cache management, which is also moving away from QuicClientTransport.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/109

Reviewed By: mjoras

Differential Revision: D20463300

Pulled By: yangchi

fbshipit-source-id: e9f0dc6285ccc6fd8cdc98d0e3579e6af8b00306
2020-03-15 23:57:24 -07:00
Matt Joras
7a08fec63d Set active connection id limit properly
Summary: This has a mandatory minimum of 2. This diff doesn't fix the unit tests which use a lower value, but currently other clients will fail our connection as this is a MUST.

Reviewed By: lnicco

Differential Revision: D20299054

fbshipit-source-id: 769337ccc5bdf75b7b85518bf88e393979b63f3f
2020-03-05 20:30:21 -08:00
Matt Joras
98e12004d0 Set a cap on the UDP send packet length.
Summary: This is a somewhat arbitrary limit, but is useful for keepin a client from making the server build an enormous packet.

Reviewed By: yangchi

Differential Revision: D19438682

fbshipit-source-id: 2ec3b8c8ba630804e954f606ada2cc00682b3657
2020-01-17 13:21:20 -08:00
Amaury Séchet
65c8e63208 Extract CachedServerTransportParameters in its own file (#84)
Summary:
QuicCachedPsk depends on fizz, CachedServerTransportParameters doesn't, so this is one step further toward separating fizz specific part of the code from the rest.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/84

Reviewed By: sharma95

Differential Revision: D19386613

Pulled By: udippant

fbshipit-source-id: 06bc21108aa7880e1f1820cb8a4c6dbee392c9c4
2020-01-15 10:18:35 -08:00
Viktor Chynarov
20807a350d Exchange active_connection_id_limit in transport parameters [2/2]
Summary:
Client will set their active_connection_id_limit to the server as 7 (so it will
have 8 conn ids in total).

Reviewed By: JunqiWang

Differential Revision: D18532441

fbshipit-source-id: b0be65cec9f7c483469b0b4a2810bc370a6945c3
2019-11-20 08:46:56 -08:00
Aman Sharma
69ac8aeb62 De-templatize stream state machine logic
Summary: The state machine logic is quite abstruse, this modifies it to make it more readable.

Reviewed By: siyengar

Differential Revision: D18488301

fbshipit-source-id: c6fd52973880931e34904713e8b147f56d0c4629
2019-11-19 20:18:11 -08:00
Amaury Séchet
6d19c622b2 Use a factory to create ClientHandshake (#59)
Summary:
This will allow to be able to create different kind of handshake going forward.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/59

Reviewed By: siyengar

Differential Revision: D18088574

Pulled By: mjoras

fbshipit-source-id: 0732bb63a9e243fef77cdaf4f76e711fcb09ecdc
2019-11-04 16:06:18 -08:00
Viktor Chynarov
d7748a8382 active_connection_id_limit transport parameter
Summary:
^

This parameter was added in d-21. Default value is 0 meaning no provided
connection id apart from the initial ones. This limits the amount of connection
ids the peer provides via `NEW_CONNECTION_ID` frame.

Diff to set this value will be added in later, along with `NEW_CONNECTION_ID`.

Reviewed By: JunqiWang

Differential Revision: D17532007

fbshipit-source-id: 5b86f69a8d3372fbcb7e0882508ea2661a9d4864
2019-09-25 08:07:28 -07:00
Subodh Iyengar
3ac1121c70 remove unused variant type
Summary: Remove unused variant types

Reviewed By: yangchi

Differential Revision: D17247100

fbshipit-source-id: dfe089ce2a65ac6c27d2fde0e2129142706bb81d
2019-09-19 17:31:47 -07:00
Bonnie Xu
3e14356c1c Fix qlogger to accomodate for retry
Summary:
Fixes include
1. Added packet_sent qlog event where it should be.
2. Reinitialize the qLogger after retry.
3. Fix issue where retry fails because packetNum can't be found.

Reviewed By: mjoras

Differential Revision: D16403221

fbshipit-source-id: 9288c1b24e98dc11e3b83575f58ca05445261ae3
2019-07-20 16:06:22 -07:00
Matt Joras
ece3cbe387 Draft-22 varint error codes
Summary: These were changed to varints. To support this we need to do some extra horrible version plumbing. I don't want to keep this long term but it works for now.

Reviewed By: yangchi

Differential Revision: D16293568

fbshipit-source-id: a9ea9083be160aa3e6b338a7d70d7f00e44ec5ab
2019-07-18 12:07:57 -07:00
Junqi Wang
d20ea53ec1 Update quic psk cache to d-20
Summary:
Fixed QuicClientTransportIntegrationTest:
SetUp() shouldn't set maxStreams manually. Instead, client should read serverTransportParams after 1 rtt.
The tests used to call createBidiStream right after client->start(), changed that to only sending data after onTransportReady.

Reviewed By: mjoras

Differential Revision: D15293209

fbshipit-source-id: 88e739d72f1fad76666af003d446d068e6d5fac7
2019-05-10 16:19:43 -07:00
Matt Joras
b2e1eedfd3 Mostly remove version negotiation
Summary:
Draft-19 onwards effectively punted version negotiation to QUICv2. Now receiving version negotiation on clients is treated as an immediate termination of the connection.

The transport parameter format has also changed to no longer include any reference to the QUIC version. To avoid us (Facebook) having to turn off QUIC traffic in production, our server needs to be able to parse these transport parameters from our older clients. To achieve this when parsing the transport parameters we will, as a temporary measure, check for the Facebook QUIC version to determine which transport parameter format we are parsing. Luckily for us the version we chose maps nicely to an implausible length for the transport parameters (0xface).

Note that this diff still has the client send the old transport parameter format, so that the rollout can be staged.

Reviewed By: yangchi

Differential Revision: D15203481

fbshipit-source-id: dfaaddc3acc76434461b04430b82a0902138c060
2019-05-10 12:55:28 -07:00
Luca Niccolini
9fdde08fc9 autodeps
Summary:
```
find ./quic -iname TARGETS | xargs -I {} autodeps -t {}
```

Reviewed By: sharma95

Differential Revision: D15212002

fbshipit-source-id: 3508beec9bf6dc1fee242223f44183dcfef960b6
2019-05-06 15:18:40 -07:00
Matt Joras
41fbfa84c5 Change idle_timeout transport parameter to milliseconds
Summary: This changed in to be in milliseconds d19 forward.

Reviewed By: yangchi

Differential Revision: D15183837

fbshipit-source-id: 561218321dcb51ec41093cafbdb967db2d4b3660
2019-05-02 15:50:27 -07:00
Aman Sharma
c04e0e08a2 Implementing stateless retry on the client
Summary:
This diff implements the handling of retry packets. As per the spec:
1. A client MUST accept and process at most one Retry packet for each connection attempt.  After the client has received and processed an Initial or Retry packet from the server, it MUST discard any subsequent Retry packets that it receives.
2. Clients MUST discard Retry packets that contain an Original Destination Connection ID field that does not match the Destination Connection ID from its Initial packet. This prevents an off-path attacker from injecting a Retry packet.
3. The client responds to a Retry packet with an Initial packet that includes the provided Retry Token to continue connection establishment.
4. A client sets the Destination Connection ID field of this Initial packet to the value from the Source Connection ID in the Retry packet.  Changing Destination Connection ID also results in a change to the keys used to protect the Initial packet.  It also sets the Token field to the token provided in the Retry.

Reviewed By: mjoras

Differential Revision: D14464508

fbshipit-source-id: 212539a588378fb0d795caaec150959680172781
2019-05-01 16:49:05 -07:00
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00