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 8cac8b117b
net/dns/resolver: set TC flag when UDP responses exceed size limits (#18157)
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>
3 months ago
..
debug.go all: remove AUTHORS file and references to it 4 months ago
doh_test.go all: remove AUTHORS file and references to it 4 months ago
forwarder.go net/dns/resolver: set TC flag when UDP responses exceed size limits (#18157) 3 months ago
forwarder_test.go net/dns/resolver: set TC flag when UDP responses exceed size limits (#18157) 3 months ago
macios_ext.go all: remove AUTHORS file and references to it 4 months ago
tsdns.go net/dns/resolver: set TC flag when UDP responses exceed size limits (#18157) 3 months ago
tsdns_server_test.go all: remove AUTHORS file and references to it 4 months ago
tsdns_test.go net/dns/resolver: set TC flag when UDP responses exceed size limits (#18157) 3 months ago