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/util
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
2 years ago
..
cibuild all: update copyright and license headers 3 years ago
clientmetric util/clientmetric: allow client metric values to be provided by a function 3 years ago
cloudenv all: update copyright and license headers 3 years ago
cmpver util/cmpver: add a few tests covering different OS versions 2 years ago
cmpx all: update exp/slices and fix call sites 2 years ago
codegen util/codegen: support embedded fields 3 years ago
cstruct all: update copyright and license headers 3 years ago
deephash util/deephash: add IncludeFields, ExcludeFields HasherForType Options 2 years ago
dirwalk all: use tstest.Replace more 3 years ago
dnsname cmd/tailscale: extend hostname validation (#7678) 3 years ago
goroutines util/goroutines: let ScrubbedGoroutineDump get only current stack 3 years ago
groupmember all: update copyright and license headers 3 years ago
hashx all: update copyright and license headers 3 years ago
httpm util/httpm, all: add a test to make sure httpm is used consistently 2 years ago
jsonutil all: update copyright and license headers 3 years ago
limiter util/lru, util/limiter: add debug helper to dump state as HTML 2 years ago
lineread all: update copyright and license headers 3 years ago
linuxfw util/linuxfw: fix crash in DelSNATRule when no rules are found 2 years ago
lru util/lru: update c.head when deleting the most recently used entry 2 years ago
mak various: add golangci-lint, fix issues (#7905) 3 years ago
multierr all: use Go 1.21 slices, maps instead of x/exp/{slices,maps} 2 years ago
must all: update copyright and license headers 3 years ago
osdiag util/osdiag: add query for Windows page file configuration and status 2 years ago
osshare all: update copyright and license headers 3 years ago
pidowner all: update copyright and license headers 3 years ago
precompress all: update copyright and license headers 3 years ago
quarantine all: update copyright and license headers 3 years ago
race net/dns/resolver: race UDP and TCP queries (#9544) 2 years ago
racebuild all: update copyright and license headers 3 years ago
rands util/rands: add package with HexString func 2 years ago
ringbuffer util/ringbuffer: move generic ringbuffer from corp repo 3 years ago
set util/set: add some useful utility functions for Set (#9535) 2 years ago
singleflight all: update copyright and license headers 3 years ago
slicesx util/slicesx: add EqualSameNil, like slices.Equal but same nilness 2 years ago
syspolicy util/syspolicy: add read boolean setting (#9592) 2 years ago
sysresources util/sysresources, magicsock: scale DERP buffer based on system memory 3 years ago
systemd all: update copyright and license headers 3 years ago
testenv util/testenv: add new package to hold InTest 2 years ago
truncate util: add truncate package (#7490) 3 years ago
uniq all: update copyright and license headers 3 years ago
vizerror util/vizerror: add As function to get wrapped Error 3 years ago
winutil winutil: refactor methods to get values from registry to also return (#9536) 2 years ago