summaryrefslogtreecommitdiffstats
path: root/src/shrpx_http3_upstream.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:52:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:52:22 +0000
commit6a7eecec57783a042d12f895d5ae148c44f4d074 (patch)
tree77a2c3c5612655f1dd15e9a2ddf14e13bab90b1f /src/shrpx_http3_upstream.cc
parentReleasing progress-linux version 1.59.0-1~progress7.99u1. (diff)
downloadnghttp2-6a7eecec57783a042d12f895d5ae148c44f4d074.tar.xz
nghttp2-6a7eecec57783a042d12f895d5ae148c44f4d074.zip
Merging upstream version 1.60.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shrpx_http3_upstream.cc')
-rw-r--r--src/shrpx_http3_upstream.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/shrpx_http3_upstream.cc b/src/shrpx_http3_upstream.cc
index f8ae1ce..b8667a3 100644
--- a/src/shrpx_http3_upstream.cc
+++ b/src/shrpx_http3_upstream.cc
@@ -213,7 +213,7 @@ int get_new_connection_id(ngtcp2_conn *conn, ngtcp2_cid *cid, uint8_t *token,
auto &qkm = qkms->keying_materials.front();
if (generate_quic_connection_id(*cid, cidlen, worker->get_cid_prefix(),
- qkm.id, qkm.cid_encryption_key.data()) != 0) {
+ qkm.id, qkm.cid_encryption_ctx) != 0) {
return NGTCP2_ERR_CALLBACK_FAILURE;
}
@@ -611,7 +611,7 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
if (generate_quic_connection_id(scid, SHRPX_QUIC_SCIDLEN,
worker->get_cid_prefix(), qkm.id,
- qkm.cid_encryption_key.data()) != 0) {
+ qkm.cid_encryption_ctx) != 0) {
return -1;
}
@@ -635,7 +635,6 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
settings.cc_algo = quicconf.upstream.congestion_controller;
settings.max_window = http3conf.upstream.max_connection_window_size;
settings.max_stream_window = http3conf.upstream.max_window_size;
- settings.max_tx_udp_payload_size = SHRPX_QUIC_MAX_UDP_PAYLOAD_SIZE;
settings.rand_ctx.native_handle = &worker->get_randgen();
settings.token = token;
settings.tokenlen = tokenlen;
@@ -783,7 +782,9 @@ int Http3Upstream::write_streams() {
auto path_max_udp_payload_size =
ngtcp2_conn_get_path_max_tx_udp_payload_size(conn_);
#endif // UDP_SEGMENT
- auto max_pktcnt = ngtcp2_conn_get_send_quantum(conn_) / max_udp_payload_size;
+ auto max_pktcnt =
+ std::max(ngtcp2_conn_get_send_quantum(conn_) / max_udp_payload_size,
+ static_cast<size_t>(1));
ngtcp2_pkt_info pi, prev_pi;
uint8_t *bufpos = tx_.data.get();
ngtcp2_path_storage ps, prev_ps;