DoH: improvements

- decode results when individual requests are done
- makes happy eyeballing start asap
- remove doh_resp structures as no longer needed
- remove CURL_DNS_TYPE_NS, CURL_DNS_TYPE_CNAME and
  CURL_DNS_TYPE_DNAME from DoH
- DoH: do not set PIPEWAIT and SSL OPTS when url starts with http:
- mark Doh master handle as dirty after every sub-request, not only the last
- Doh: start probe on AAAA before A (was the other way).

cf-dns: set EXPIRE_HAPPY_EYEBALLS timer when waiting 50ms on AAAA
result or progress will not be triggered in time.

Add debug env var CURL_DBG_HE_AAAA_AWAIT_MS to override the
default 50ms on waiting for the AAAA result to arrive.

test2100: set CURL_DBG_HE_AAAA_AWAIT_MS to 60 seconds to
provide enough time for slow CI runs to sent all DoH requests.

closes #22514
This commit is contained in:
Stefan Eissing 2026-08-08 13:20:15 +02:00 committed by Daniel Stenberg
parent 791b6883ed
commit 2d30fd26a0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 390 additions and 439 deletions

View file

@ -188,7 +188,7 @@ static const char *type2string(uint16_t qtype)
* Return query (qname + type + class), type and id.
*/
static int store_incoming(const char *source, int query_id,
const unsigned char *data, size_t size,
const unsigned char *data, size_t datalen,
unsigned char *qbuf, size_t qbuflen, size_t *qlen,
uint16_t *qtype, uint16_t *idp)
{
@ -200,12 +200,18 @@ static int store_incoming(const char *source, int query_id,
uint16_t qd;
const uint8_t *qptr;
char name[256];
size_t qsize;
size_t qsize, size;
*qlen = 0;
*qtype = 0;
*idp = 0;
size = datalen;
if(datalen < 16) {
logmsg("query data size is too small: %ld", (long)datalen);
return -1;
}
snprintf(dumpfile, sizeof(dumpfile), "%s/dnsd.input", logdir);
/* Open request dump file. */