diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-09-10 15:40:51 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-09-10 16:52:29 +0200 |
commit | 4fb5a643c8babd6b42776642c111c8a7a38b0e32 (patch) | |
tree | aef0879d60808a35d654d996198b226837dd89b7 | |
parent | 0cc8fc88255e01a1737b6ae9b652048da9b28b68 (diff) | |
download | curl-4fb5a643c8babd6b42776642c111c8a7a38b0e32.tar.gz |
ngtcp2: adapt to new size defintions upstream
Reviewed-by: Tatsuhiro Tsujikawa
Closes #7699
-rw-r--r-- | lib/vquic/ngtcp2.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c index 16f4d66c1..776cdc069 100644 --- a/lib/vquic/ngtcp2.c +++ b/lib/vquic/ngtcp2.c @@ -1712,8 +1712,7 @@ static CURLcode ng_flush_egress(struct Curl_easy *data, int rv; ssize_t sent; ssize_t outlen; - uint8_t out[NGTCP2_MAX_PKTLEN_IPV4]; - size_t pktlen; + uint8_t out[NGTCP2_MAX_UDP_PAYLOAD_SIZE]; ngtcp2_path_storage ps; ngtcp2_tstamp ts = timestamp(); struct sockaddr_storage remote_addr; @@ -1726,19 +1725,6 @@ static CURLcode ng_flush_egress(struct Curl_easy *data, ssize_t ndatalen; uint32_t flags; - switch(qs->local_addr.ss_family) { - case AF_INET: - pktlen = NGTCP2_MAX_PKTLEN_IPV4; - break; -#ifdef ENABLE_IPV6 - case AF_INET6: - pktlen = NGTCP2_MAX_PKTLEN_IPV6; - break; -#endif - default: - assert(0); - } - rv = ngtcp2_conn_handle_expiry(qs->qconn, ts); if(rv) { failf(data, "ngtcp2_conn_handle_expiry returned error: %s", @@ -1765,7 +1751,8 @@ static CURLcode ng_flush_egress(struct Curl_easy *data, flags = NGTCP2_WRITE_STREAM_FLAG_MORE | (fin ? NGTCP2_WRITE_STREAM_FLAG_FIN : 0); - outlen = ngtcp2_conn_writev_stream(qs->qconn, &ps.path, NULL, out, pktlen, + outlen = ngtcp2_conn_writev_stream(qs->qconn, &ps.path, NULL, out, + sizeof(out), &ndatalen, flags, stream_id, (const ngtcp2_vec *)vec, veccnt, ts); if(outlen == 0) { |