Commit Graph

150 Commits

Author SHA1 Message Date
vvb2060
e631f6e10e
ngtcp2: fix incompatible function pointer types
Closes #9056
2022-06-28 00:02:36 +02:00
Stefan Eissing
8135d420ee
ngtcp2: avoid supplying 0 length msg_control to sendmsg()
Testing on macOS 12.4, sendmsg() fails with EINVAL when a msg_control
buffer is provided in sengmsg(), even though msg_controllen was set to
0.

Initialize msg.msg_controllen just as needed and also perform the size
assertion only when needed.

Closes #9039
2022-06-23 16:11:32 +02:00
max.mehl
ad9bc5976d
copyright: make repository REUSE compliant
Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the file
`.reuse/dep5`.

This commit also adds a Github workflow to check pull requests and adapts
copyright.pl to the changes.

Closes #8869
2022-06-13 09:13:00 +02:00
Viktor Szakats
dd94076947
ngtcp2: fix typo in preprocessor condition
Ref: 927ede7edc

Bug: https://github.com/curl/curl/pull/8981#discussion_r894312185
Reported-by: Emil Engler
Closes #8987
2022-06-10 23:07:15 +00:00
Tatsuhiro Tsujikawa
927ede7edc
ngtcp2: build without sendmsg
Closes #8981
2022-06-10 09:10:54 +02:00
Tatsuhiro Tsujikawa
d2c6d8be18
ngtcp2: use handshake helper funcs to simplify TLS handshake integration
Closes #8968
2022-06-10 09:07:33 +02:00
Tatsuhiro Tsujikawa
298c1dfc7b
ngtcp2: fix assertion failure on EMSGSIZE
Closes #8958
2022-06-05 12:12:26 +02:00
Tatsuhiro Tsujikawa
3288e9c6d3
ngtcp2: enable Linux GSO
Enable Linux GSO in ngtcp2 QUIC.  In order to recover from the
EAGAIN/EWOULDBLOCK by sendmsg with multiple packets in one GSO write,
packet buffer is now held by struct quicsocket.  GSO write might fail in
runtime depending on NIC.  Disable GSO if sendmsg returns EIO.

Closes #8909
2022-05-31 16:04:12 +02:00
Tatsuhiro Tsujikawa
8ea851b29d
ngtcp2: Allow curl to send larger UDP datagrams
Allow curl to send larger UDP datagram if Path MTU Discovery finds the
availability of larger path MTU.  To make it work and not to send
fragmented packet, we need to set DF bit.  That makes send(2) fail with
EMSGSIZE if UDP datagram is too large.  In that case, just let it be
lost.  This patch enables DF bit for Linux only.

Closes #8883
2022-05-20 17:50:38 +02:00
Tatsuhiro Tsujikawa
9accb9a5be
ngtcp2: extend QUIC transport parameters buffer
Extend QUIC transport parameters buffer because 64 bytes are too
short for the ever increasing parameters.

Closes #8872
2022-05-19 14:56:50 +02:00
Tatsuhiro Tsujikawa
136ab928c8
ngtcp2: handle error from ngtcp2_conn_submit_crypto_data
Closes #8871
2022-05-19 14:55:37 +02:00
Tatsuhiro Tsujikawa
fe1d00e71b
ngtcp2: send appropriate connection close error code
Closes #8870
2022-05-19 14:54:46 +02:00
vvb2060 on github
adde9f0e8c
ngtcp2: support boringssl crypto backend
Closes #8789
2022-05-16 18:21:54 +02:00
Tatsuhiro Tsujikawa
6fcd3e6f51
quic: add Curl_quic_idle
Add Curl_quic_idle which is called when no HTTP level read or write is
performed.  It is a good place to handle timer expiry for QUIC transport
(.e.g, retransmission).

Closes #8698
2022-05-16 18:19:08 +02:00
Tatsuhiro Tsujikawa
5980068c87
ngtcp2: Correct use of ngtcp2 and nghttp3 signed integer types
Closes #8851
2022-05-16 10:02:50 +02:00
Tatsuhiro Tsujikawa
33e819d799
ngtcp2: Fix alert_read_func return value
Closes #8852
2022-05-16 09:57:37 +02:00
Tatsuhiro Tsujikawa
b01f3e679f
ngtcp2: add ca-fallback support for OpenSSL backend
Closes #8828
2022-05-10 09:43:08 +02:00
Tatsuhiro Tsujikawa
ca94497a82
ngtcp2: deal with sub-millisecond timeout
Closes #8738
2022-04-25 11:37:18 +02:00
Tatsuhiro Tsujikawa
458c4b1df7
ngtcp2: avoid busy loop in low CWND situation
Closes #8739
2022-04-24 23:21:27 +02:00
Daniel Stenberg
6968fb9d54
lib: remove exclamation marks
... from infof() and failf() calls. Make them less attention seeking.

Closes #8713
2022-04-16 11:55:05 +02:00
Tatsuhiro Tsujikawa
cd29c1651e
ngtcp2: fix memory leak
Closes #8691
2022-04-10 23:10:21 +02:00
Tatsuhiro Tsujikawa
fa25dab7fd
ngtcp2: remove remote_addr which is not used in a meaningful way
Closes #8689
2022-04-10 23:09:41 +02:00
Tatsuhiro Tsujikawa
f15beb6f30
ngtcp2: enlarge H3_SEND_SIZE
Make h3_SEND_SIZE larger because current value (20KiB) is too small
for the high latency environment.

Closes #8690
2022-04-10 23:08:33 +02:00
Tatsuhiro Tsujikawa
990bfdd7bc
ngtcp2: fix HTTP/3 upload stall and avoid busy loop
This commit fixes HTTP/3 upload stall if upload data is larger than
H3_SEND_SIZE.  Only check writability of socket if a stream is
writable to avoid busy loop when QUIC flow control window is filled
up, or upload buffer is full.

Closes #8688
2022-04-10 23:07:42 +02:00
Tatsuhiro Tsujikawa
92c0123585
ngtcp2: use token when detecting :status header field
Closes #8679
2022-04-05 16:48:44 +02:00
Tatsuhiro Tsujikawa
913b80d5fd
ngtcp2: make curl 1ms faster
Pass 0 for an already expired timer.

Closes #8678
2022-04-05 16:47:18 +02:00
Tatsuhiro Tsujikawa
1b1443a8ed
ngtcp2: fix QUIC_IDLE_TIMEOUT
QUIC_IDLE_TIMEOUT should be of type ngtcp2_duration which is
nanoseconds resolution.

Closes #8678
2022-04-05 16:47:07 +02:00
Daniel Stenberg
235535cf23
ngtcp2: update to work after recent ngtcp2 updates
Assisted-by: Tatsuhiro Tsujikawa
Reported-by: jurisuk on github
Fixes #8638
Closes #8639
2022-03-26 18:35:23 +01:00
Tatsuhiro Tsujikawa
c82b281e17
ngtcp2: add client certificate authentication for OpenSSL
Closes #8522
2022-03-10 08:41:37 +01:00
Daniel Stenberg
96edc7954f
ngtcp2: disconnect the QUIC connection proper
Reported-by: mehatzri on github
Reviewed-by: Tatsuhiro Tsujikawa
Fixes #8534
closes #8569
2022-03-10 08:26:18 +01:00
Tatsuhiro Tsujikawa
6e9373b5f4
ngtcp2: Reset dynbuf when it is fully drained
Reported-by: vl409 on github
Fixes #7351
Closes #8504
2022-02-24 16:56:33 +01:00
Daniel Stenberg
4ab3ed0729
ngtcp2: use Curl_pseudo_headers 2022-02-07 13:56:06 +01:00
Daniel Stenberg
79731d1a6c
ngtcp2/quiche: make :scheme possible to set 2022-02-07 13:56:06 +01:00
Daniel Stenberg
136f3e9d68
h2/h3: provide and refer to pseudo headers as defines
... and do sizeof() on the defines to use constants better.

Closes #8389
2022-02-05 11:08:43 +01:00
Daniel Stenberg
f6dd94f640
ngtcp2: adapt to changed end of headers callback proto
Closes #8322
2022-01-24 13:22:54 +01:00
Daniel Stenberg
4936e60bb9
ngtcp2: fix declaration of ‘result’ shadows a previous local
Follow-up to 8fbd6feddf

Closes #8245
2022-01-08 14:41:33 +01:00
Daniel Stenberg
8fbd6feddf
ngtcp2: verify the server certificate for the gnutls case
Closes #8178
2021-12-28 23:34:30 +01:00
Daniel Stenberg
c148f0f551
ngtcp2: verify the server cert on connect (quictls)
Make ngtcp2+quictls correctly acknowledge `CURLOPT_SSL_VERIFYPEER` and
`CURLOPT_SSL_VERIFYHOST`.

The name check now uses a function from lib/vtls/openssl.c which will
need attention for when TLS is not done by OpenSSL or is disabled while
QUIC is enabled.

Possibly the servercert() function in openssl.c should be adjusted to be
able to use for both regular TLS and QUIC.

Ref: #8173
Closes #8178
2021-12-28 23:34:23 +01:00
Tatsuhiro Tsujikawa
9db25d213b
ngtcp2: advertise h3 as well as h3-29
Advertise h3 as well as h3-29 since some servers out there require h3
for QUIC v1.

Closes #7979
2021-11-09 11:46:12 +01:00
Tatsuhiro Tsujikawa
10bc426dd2
ngtcp2: use QUIC v1 consistently
Since we switched to v1 quic_transport_parameters codepoint in #7960
with quictls, lets use QUIC v1 consistently.

Closes #7979
2021-11-09 11:45:41 +01:00
Tatsuhiro Tsujikawa
d9d842989c
ngtcp2: compile with the latest nghttp3
Closes #7978
2021-11-09 11:40:00 +01:00
Amaury Denoyelle
d1624b94f0
ngtcp2: support latest QUIC TLS RFC9001
QUIC Transport Parameters Extension has been changed between draft-29
and latest RFC9001. Most notably, its identifier has been updated from
0xffa5 to 0x0039. The version is selected through the QUIC TLS library
via the legacy codepoint.

Disable the usage of legacy codepoint in curl to switch to latest
RFC9001. This is required to be able to keep up with latest QUIC
implementations.

Acked-by: Tatsuhiro Tsujikawa
Closes #7960
2021-11-05 10:42:46 +01:00
Tatsuhiro Tsujikawa
e05c08687f
ngtcp2: specify the missing required callback functions
Closes #7929
2021-11-01 15:54:24 +01:00
Jun-ya Kato
4a10a99ef0
ngtcp2: fix QUIC transport parameter version
fix inappropriate version setting for QUIC transport parameters.
this patch keeps curl with ngtcp2 uses QUIC draft version (h3-29).

Closes #7771
2021-09-25 16:06:13 +02:00
Tatsuhiro Tsujikawa
24a7cbe9d2
ngtcp2: fix build with ngtcp2 and nghttp3
ngtcp2_conn_client_new and nghttp3_conn_client_new are now macros.
Check the wrapped functions instead.

ngtcp2_stream_close callback now takes flags parameter.

Closes #7709
2021-09-12 12:34:32 +02:00
Daniel Stenberg
4fb5a643c8
ngtcp2: adapt to new size defintions upstream
Reviewed-by: Tatsuhiro Tsujikawa
Closes #7699
2021-09-10 16:52:29 +02:00
Tatsuhiro Tsujikawa
14da6eb4e5
ngtcp2: stop buffering crypto data
Stop buffering crypto data because libngtcp2 now buffers submitted
crypto data.

Closes #7637
2021-08-26 16:31:59 +02:00
Daniel Stenberg
44f88e662f
ngtcp2: remove the acked_crypto_offset struct field init
... as it is gone from the API upstream.

Closes #7578
2021-08-16 23:06:36 +02:00
Tatsuhiro Tsujikawa
2bfa57bff1
ngtcp2: utilize crypto API functions to simplify
Closes #7551
2021-08-10 23:17:28 +02:00
megatronking
09cea3fbef
ngtcp2: reset the oustanding send buffer again when drained
Closes #7538
2021-08-10 23:07:42 +02:00