cf-dns: connection filter for DNS queries

New connection filter `cf-dns` that manages DNS queries. If hands
out addresses and HTTPS-RR records to anyone interested. Used by
HTTPS and IP happy eyeballing.

Information may become available *before* the libcurl "dns entry"
is complete, e.g. all queries have been answered. The cf-ip-happy
filter uses this information to start connection attempts as soon
as the first address is available.

The multi MSTATE_RESOLVING was removed. A new connection always
goes to MSTATE_CONNECTING. The connectdata bit `dns_resolved`
indicates when DNS information is complete. This is used for
error reporting and starting the progress meter.

Removed dns entries `data->state.dns[i]`, as the `cf-dns` filter
now keeps the reference now.

Many minor tweaks for making this work and pass address information
around safely.

Closes #21027
This commit is contained in:
Stefan Eissing 2026-03-25 15:07:10 +01:00 committed by Daniel Stenberg
parent 89741958e8
commit 335dc0e3c5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
44 changed files with 1785 additions and 1017 deletions

View file

@ -349,6 +349,19 @@ static timediff_t async_ares_poll_timeout(struct async_ares_ctx *ares,
return 1000;
}
const struct Curl_addrinfo *
Curl_async_get_ai(struct Curl_easy *data,
struct Curl_resolv_async *async,
int ai_family, unsigned int index)
{
/* Not supported by our implementation yet. */
(void)data;
(void)async;
(void)ai_family;
(void)index;
return NULL;
}
/*
* Curl_async_await()
*