Summary: [quic] Add packetDrop to Quic, so it can be logged in qlog.
Reviewed By: yangchi
Differential Revision: D16257829
fbshipit-source-id: ca87116f2c708538d05f28098620a5dfc2456f3e
Summary:
Draft-22 onwards uses two one byte length fields to encode connection ID length instead of one one byte length field.
To support this without disrupting existing clients we need to make our parsing version dependent. This diff accomplishes it by special casing the existing Facebook client QUIC version (0xfaceb000), and changing the default Facebook client version going forward to 0xfaceb001.
Note that this diff also changes the behavior of the ticket transport parameters. When we changed from draft-18 to draft-19 transport parameters I apparently forgot to update the ticket transport parameters to the new format.
Reviewed By: yangchi
Differential Revision: D16205090
fbshipit-source-id: e74a92fa959d308f4bb43bad76e58d4b58d07322
Summary: Rename `add` to `addPacket`, since `add` is an ambiguous function name, especially as we include more events.
Reviewed By: sharma95
Differential Revision: D16102141
fbshipit-source-id: 73196a5f1bcc681e3bb0a26fd9edaf34f59bf710
Summary:
This ensure a lot of code do not depend on fizz anymore.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/26
Reviewed By: mjoras, JunqiWang
Differential Revision: D16030663
Pulled By: yangchi
fbshipit-source-id: a3cc34905a6afb657da194e2166434425e7e163c
Summary:
* Remove some old kruft and what looks like an old debugging message from `CMakeLists.txt`
* Only use `-Werror=bool-compare` if the compiler actually supports it
* Mark a bunch of C++ method parameters as `FOLLY_MAYBE_UNUSED` to avoid compiler warnings
* Fix a bunch of signed/unsigned comparisons in tests to avoid compiler warnings
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/9
Reviewed By: yangchi
Differential Revision: D15281424
Pulled By: mjoras
fbshipit-source-id: 0d6dc6d30a93032e9ee2e9b7d0873b4a2ecd7650
Summary: This is the followup to the previous change to update to the post-d19 transport param format.
Reviewed By: sharma95, lnicco
Differential Revision: D15398080
fbshipit-source-id: a6f1a9d399745058b081ffc4d1fc2be2571a8a69
Summary:
0-rtt would fail for the second time, because client will write 0 to
the psk cache when server transport parameter is not negotiated
Reviewed By: udippant
Differential Revision: D15414960
fbshipit-source-id: 99f5f61bad97ad452a882a52220ad34baa6be778
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
Summary:
value_or seems to copy the connectionid. This changes it so that we avoid the
copy in frequently called places.
Reviewed By: yangchi
Differential Revision: D15300395
fbshipit-source-id: 4b2098cf624b748c5c3158f27777fd7435a823d0
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
Summary:
Close the socket when fatal error occurred. This prevents quic transport from receiving readCallback from a bad socket.
Also, close the happy eyeball socket when transport is shutdown.
Reviewed By: siyengar
Differential Revision: D15264105
fbshipit-source-id: e6c33f626cdef6a4ebc6820e39ac78da525133d0
Summary: The check should be < not <=.
Reviewed By: mjoras, kvtsoy
Differential Revision: D15279146
fbshipit-source-id: adb4c315aab269d595caa186591eeb5e82e3223c
Summary:
In the client transport case, an exception is thrown before return. In
the batch write maker case, the previous switch/case handles all possible cases
Reviewed By: udippant
Differential Revision: D15260725
fbshipit-source-id: 2ce7277544ee810729140aeb304e6484d339f3db
Summary: This is step 1 for removing reset on reset, since the send side may need to transition to waiting for a reset ack while the read side is an any state.
Reviewed By: lnicco
Differential Revision: D15075849
fbshipit-source-id: 1e094942a8a1ca9a01d4161cd6309b4136a9cfbf
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