You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/net/dns/resolver
Andrew Dunham 286c6ce27c
net/dns/resolver: race UDP and TCP queries (#9544)
Instead of just falling back to making a TCP query to an upstream DNS
server when the UDP query returns a truncated query, also start a TCP
query in parallel with the UDP query after a given race timeout. This
ensures that if the upstream DNS server does not reply over UDP (or if
the response packet is blocked, or there's an error), we can still make
queries if the server replies to TCP queries.

This also adds a new package, util/race, to contain the logic required for
racing two different functions and returning the first non-error answer.

Updates tailscale/corp#14809

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: I4311702016c1093b1beaa31b135da1def6d86316
9 months ago
..
debug.go all: update copyright and license headers 1 year ago
doh_test.go net/dns/resolver: remove maxDoHInFlight 1 year ago
forwarder.go net/dns/resolver: race UDP and TCP queries (#9544) 9 months ago
forwarder_test.go net/dns/resolver: race UDP and TCP queries (#9544) 9 months ago
macios_ext.go all: avoid repeated default interface lookups 1 year ago
tsdns.go net/dns: retry forwarder requests over TCP 9 months ago
tsdns_server_test.go all: update copyright and license headers 1 year ago
tsdns_test.go net/dns/resolver: race UDP and TCP queries (#9544) 9 months ago