Compile with the latest ngtcp2

This commit is contained in:
Tatsuhiro Tsujikawa 2021-11-09 15:44:06 +09:00
parent d14d97ab68
commit 918e4ea46b
2 changed files with 26 additions and 8 deletions

View File

@ -480,8 +480,14 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen,
params.max_idle_timeout = 30 * NGTCP2_SECONDS; params.max_idle_timeout = 30 * NGTCP2_SECONDS;
auto path = ngtcp2_path{ auto path = ngtcp2_path{
{local_addrlen, const_cast<sockaddr *>(local_addr)}, {
{remote_addrlen, const_cast<sockaddr *>(remote_addr)}, const_cast<sockaddr *>(local_addr),
local_addrlen,
},
{
const_cast<sockaddr *>(remote_addr),
remote_addrlen,
},
}; };
assert(config->npn_list.size()); assert(config->npn_list.size());
@ -647,8 +653,14 @@ int Client::read_quic() {
++worker->stats.udp_dgram_recv; ++worker->stats.udp_dgram_recv;
auto path = ngtcp2_path{ 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, rv = ngtcp2_conn_read_pkt(quic.conn, &path, &pi, buf.data(), nread,

View File

@ -663,8 +663,14 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
params.stateless_reset_token_present = 1; params.stateless_reset_token_present = 1;
auto path = ngtcp2_path{ auto path = ngtcp2_path{
{local_addr.len, const_cast<sockaddr *>(&local_addr.su.sa)}, {
{remote_addr.len, const_cast<sockaddr *>(&remote_addr.su.sa)}, const_cast<sockaddr *>(&local_addr.su.sa),
local_addr.len,
},
{
const_cast<sockaddr *>(&remote_addr.su.sa),
remote_addr.len,
},
const_cast<UpstreamAddr *>(faddr), const_cast<UpstreamAddr *>(faddr),
}; };
@ -1639,12 +1645,12 @@ int Http3Upstream::on_read(const UpstreamAddr *faddr,
auto path = ngtcp2_path{ auto path = ngtcp2_path{
{ {
local_addr.len,
const_cast<sockaddr *>(&local_addr.su.sa), const_cast<sockaddr *>(&local_addr.su.sa),
local_addr.len,
}, },
{ {
remote_addr.len,
const_cast<sockaddr *>(&remote_addr.su.sa), const_cast<sockaddr *>(&remote_addr.su.sa),
remote_addr.len,
}, },
const_cast<UpstreamAddr *>(faddr), const_cast<UpstreamAddr *>(faddr),
}; };