diff options
author | Alessandro Ghedini <alessandro@cloudflare.com> | 2021-02-01 13:13:37 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-02-01 16:12:45 +0100 |
commit | a0c5781cb65833aa4ece492fa5f37dd1511d051b (patch) | |
tree | f0cf68c324941d732318da184f6937d2821fcf26 /lib/vquic | |
parent | e58560bdaf215c03713c3a05a5da2d0c4d13b882 (diff) | |
download | curl-a0c5781cb65833aa4ece492fa5f37dd1511d051b.tar.gz |
quiche: don't use primary_ip / primary_port
Closes #6555
Diffstat (limited to 'lib/vquic')
-rw-r--r-- | lib/vquic/quiche.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c index 48454fc8e..d138dd3a2 100644 --- a/lib/vquic/quiche.c +++ b/lib/vquic/quiche.c @@ -179,6 +179,8 @@ CURLcode Curl_quic_connect(struct Curl_easy *data, CURLcode result; struct quicsocket *qs = &conn->hequic[sockindex]; char *keylog_file = NULL; + char ipbuf[40]; + long port; #ifdef DEBUG_QUICHE /* initialize debug log callback only once */ @@ -247,14 +249,17 @@ CURLcode Curl_quic_connect(struct Curl_easy *data, if(result) return result; - /* store the used address as a string */ - if(!Curl_addr2string((struct sockaddr*)addr, addrlen, - conn->primary_ip, &conn->primary_port)) { + /* extract the used address as a string */ + if(!Curl_addr2string((struct sockaddr*)addr, addrlen, ipbuf, &port)) { char buffer[STRERROR_LEN]; failf(data, "ssrem inet_ntop() failed with errno %d: %s", SOCKERRNO, Curl_strerror(SOCKERRNO, buffer, sizeof(buffer))); return CURLE_BAD_FUNCTION_ARGUMENT; } + + infof(data, "Connect socket %d over QUIC to %s:%ld\n", + sockfd, ipbuf, port); + Curl_persistconninfo(data, conn, NULL, -1); /* for connection reuse purposes: */ |