1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

ngtcp2: store address in sockaddr_storage

Reported-by: Tatsuhiro Tsujikawa
Closes #5733
This commit is contained in:
Daniel Stenberg 2020-07-27 14:53:08 +02:00
parent e1bac81cc8
commit d259cf1a9b
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1725,7 +1725,7 @@ static CURLcode ng_process_ingress(struct connectdata *conn, int sockfd,
int rv;
uint8_t buf[65536];
size_t bufsize = sizeof(buf);
struct sockaddr remote_addr;
struct sockaddr_storage remote_addr;
socklen_t remote_addrlen;
ngtcp2_path path;
ngtcp2_tstamp ts = timestamp();
@ -1747,7 +1747,8 @@ static CURLcode ng_process_ingress(struct connectdata *conn, int sockfd,
ngtcp2_addr_init(&path.local, &qs->local_addr,
qs->local_addrlen, NULL);
ngtcp2_addr_init(&path.remote, &remote_addr, remote_addrlen, NULL);
ngtcp2_addr_init(&path.remote, (struct sockaddr *)&remote_addr,
remote_addrlen, NULL);
rv = ngtcp2_conn_read_pkt(qs->qconn, &path, buf, recvd, ts);
if(rv != 0) {