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
Brendan Creane e590877667
net/dns/resolver: set TC flag when UDP responses exceed size limits
The forwarder was not setting the Truncated (TC) flag when UDP DNS
responses exceeded either the EDNS buffer size (if present) or the
RFC 1035 default 512-byte limit. This affected DoH, TCP fallback,
and UDP response paths.

The fix ensures checkResponseSizeAndSetTC is called in all code paths
that return UDP responses, enforcing both EDNS and default UDP size
limits.

Added comprehensive unit tests and consolidated duplicate test helpers.

Updates #18107

Signed-off-by: Brendan Creane <bcreane@gmail.com>
4 weeks ago
..
debug.go syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 2 months ago
doh_test.go net/dns/resolver: remove maxDoHInFlight 3 years ago
forwarder.go net/dns/resolver: set TC flag when UDP responses exceed size limits 4 weeks ago
forwarder_test.go net/dns/resolver: set TC flag when UDP responses exceed size limits 4 weeks ago
macios_ext.go all: avoid repeated default interface lookups 3 years ago
tsdns.go net/dns/resolver: set TC flag when UDP responses exceed size limits 4 weeks ago
tsdns_server_test.go all: update copyright and license headers 3 years ago
tsdns_test.go net/dns/resolver: set TC flag when UDP responses exceed size limits 4 weeks ago