diff --git a/src/h2load_quic.cc b/src/h2load_quic.cc index 6d729b80..7d3281b5 100644 --- a/src/h2load_quic.cc +++ b/src/h2load_quic.cc @@ -480,8 +480,14 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen, params.max_idle_timeout = 30 * NGTCP2_SECONDS; auto path = ngtcp2_path{ - {local_addrlen, const_cast(local_addr)}, - {remote_addrlen, const_cast(remote_addr)}, + { + const_cast(local_addr), + local_addrlen, + }, + { + const_cast(remote_addr), + remote_addrlen, + }, }; assert(config->npn_list.size()); @@ -647,8 +653,14 @@ int Client::read_quic() { ++worker->stats.udp_dgram_recv; auto path = ngtcp2_path{ - {local_addr.len, &local_addr.su.sa}, - {addrlen, &su.sa}, + { + &local_addr.su.sa, + local_addr.len, + }, + { + &su.sa, + addrlen, + }, }; rv = ngtcp2_conn_read_pkt(quic.conn, &path, &pi, buf.data(), nread, diff --git a/src/shrpx_http3_upstream.cc b/src/shrpx_http3_upstream.cc index 87f219db..8fdd786b 100644 --- a/src/shrpx_http3_upstream.cc +++ b/src/shrpx_http3_upstream.cc @@ -663,8 +663,14 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr, params.stateless_reset_token_present = 1; auto path = ngtcp2_path{ - {local_addr.len, const_cast(&local_addr.su.sa)}, - {remote_addr.len, const_cast(&remote_addr.su.sa)}, + { + const_cast(&local_addr.su.sa), + local_addr.len, + }, + { + const_cast(&remote_addr.su.sa), + remote_addr.len, + }, const_cast(faddr), }; @@ -1639,12 +1645,12 @@ int Http3Upstream::on_read(const UpstreamAddr *faddr, auto path = ngtcp2_path{ { - local_addr.len, const_cast(&local_addr.su.sa), + local_addr.len, }, { - remote_addr.len, const_cast(&remote_addr.su.sa), + remote_addr.len, }, const_cast(faddr), };