tailscale/net/dns/resolver
Adrian Dewhurst bcaae3e074 net/dns/resolver: clamp EDNS size
This change (subject to some limitations) looks for the EDNS OPT record
in queries and responses, clamping the size field to fit within our DNS
receive buffer. If the size field is smaller than the DNS receive buffer
then it is left unchanged.

I think we will eventually need to transition to fully processing the
DNS queries to handle all situations, but this should cover the most
common case.

Mostly fixes #2066

Signed-off-by: Adrian Dewhurst <adrian@tailscale.com>
2021-06-25 08:56:34 -04:00
..
forwarder.go net/dns/resolver: clamp EDNS size 2021-06-25 08:56:34 -04:00
macios_ext.go net/dns{,/resolver}: refactor DNS forwarder, send out of right link on macOS/iOS 2021-06-23 16:04:10 -07:00
neterr_darwin.go net/dns/resolver: permit larger max responses, signal truncation 2021-06-08 19:29:12 -04:00
neterr_other.go net/dns/resolver: permit larger max responses, signal truncation 2021-06-08 19:29:12 -04:00
neterr_windows.go net/dns/resolver: permit larger max responses, signal truncation 2021-06-08 19:29:12 -04:00
tsdns_server_test.go net/dns/resolver: clamp EDNS size 2021-06-25 08:56:34 -04:00
tsdns_test.go net/dns/resolver: clamp EDNS size 2021-06-25 08:56:34 -04:00
tsdns.go net/dns{,/resolver}: refactor DNS forwarder, send out of right link on macOS/iOS 2021-06-23 16:04:10 -07:00