asyn-ares: use the correct port number

Only triggers with old c-ares versions.

Follow-up to 8ded8e5f3f

Closes #16511
This commit is contained in:
Daniel Stenberg 2025-02-27 21:54:14 +01:00
parent af6172c8f2
commit 953cd694dc
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -592,7 +592,7 @@ static void query_completed_cb(void *arg, /* (struct connectdata *) */
res->num_pending--;
if(CURL_ASYNC_SUCCESS == status) {
struct Curl_addrinfo *ai = Curl_he2ai(hostent, data->conn->localport);
struct Curl_addrinfo *ai = Curl_he2ai(hostent, data->conn->remote_port);
if(ai) {
compound_results(res, ai);
}