summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-07-27 14:53:08 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-07-27 19:46:58 +0200
commitd259cf1a9bb6f29bc8d0bc1abcab21ac5a91ebc8 (patch)
treefb0348fda46fda092c47edcbe8ed46e1596b28b4
parente1bac81cc815f3fe968e009eb69b8e0236dcd82c (diff)
downloadcurl-d259cf1a9bb6f29bc8d0bc1abcab21ac5a91ebc8.tar.gz
ngtcp2: store address in sockaddr_storage
Reported-by: Tatsuhiro Tsujikawa Closes #5733
-rw-r--r--lib/vquic/ngtcp2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/vquic/ngtcp2.c b/lib/vquic/ngtcp2.c
index d76329f98..013c10bfa 100644
--- a/lib/vquic/ngtcp2.c
+++ b/lib/vquic/ngtcp2.c
@@ -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) {