diff options
Diffstat (limited to 'src/shrpx_http3_upstream.cc')
-rw-r--r-- | src/shrpx_http3_upstream.cc | 9 |
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; |