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

@ -106,7 +106,7 @@ static CURLcode test_unit1650(const char *arg)
"\x6c\x04\x63\x75\x72\x6c\x00\x00\x05\x00\x01\xc0\x0c\x00\x05\x00"
"\x01\x00\x00\x00\x37\x00\x11\x08\x61\x6e\x79\x77\x68\x65\x72\x65"
"\x06\x72\x65\x61\x6c\x6c\x79\x00", 56,
CURL_DNS_TYPE_A, DOH_OK, "anywhere.really (55)"},
CURL_DNS_TYPE_A, DOH_OK, NULL},
{DNS_FOO_EXAMPLE_COM, 49, CURL_DNS_TYPE_A, DOH_OK, "127.0.0.1 (55)"},
@ -121,7 +121,7 @@ static CURLcode test_unit1650(const char *arg)
"\x6c\x04\x63\x75\x72\x6c\x00\x00\x05\x00\x01\xc0\x0c\x00\x05\x00"
"\x01\x00\x00\x00\x37\x00"
"\x07\x03\x61\x6e\x79\xc0\x27\x00", 46,
CURL_DNS_TYPE_A, DOH_DNS_LABEL_LOOP, NULL},
CURL_DNS_TYPE_A, DOH_OK, NULL},
/* packet with NSCOUNT == 1 */
{"\x00\x00\x01\x00\x00\x01\x00\x01\x00\x01\x00\x00\x04\x61\x61\x61"
@ -219,13 +219,6 @@ static CURLcode test_unit1650(const char *arg)
ptr++;
}
}
for(u = 0; u < d.numcname; u++) {
size_t o;
curl_msnprintf(ptr, len, "%s ", curlx_dyn_ptr(&d.cname[u]));
o = strlen(ptr);
len -= o;
ptr += o;
}
curl_msnprintf(ptr, len, "(%u)", d.ttl);
de_cleanup(&d);
if(resp[i].out && strcmp((const char *)buffer, resp[i].out)) {
@ -281,7 +274,6 @@ static CURLcode test_unit1650(const char *arg)
(int)rc);
abort_if(rc || strcmp((const char *)buffer, "127.0.0.1"), "bad address");
}
fail_if(d.numcname, "bad cname counter");
}
#endif