The target of STUB might commonly not have good support
for "advanced" features like TCP.
Improvements
------------
- doh2: send HTTP error status codes (#618, !1102)
+- policy.STUB: try to avoid TCP (compared to 5.3.0; !1155)
Bugfixes
--------
* says nothing about the network RTT of said target, since
* it is doing resolution upstream. */
(*transport)->timeout = FORWARDING_TIMEOUT;
+ /* Try to avoid TCP in STUB case. It seems better for common use cases. */
+ if (qry->flags.STUB && !tcp && (*transport)->protocol == KR_TRANSPORT_TCP)
+ (*transport)->protocol = KR_TRANSPORT_UDP;
/* We need to propagate this to flags since it's used in other
* parts of the resolver (e.g. logging and stats). */
qry->flags.TCP = tcp;