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
Andrew Dunham 3f4d51c588 net/dns: don't send on closed channel when message too large
Previously, if a DNS-over-TCP message was received while there were
existing queries in-flight, and it was over the size limit, we'd close
the 'responses' channel. This would cause those in-flight queries to
send on the closed channel and panic.

Instead, don't close the channel at all and rely on s.ctx being
canceled, which will ensure that in-flight queries don't hang.

Fixes #6725

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: I8267728ac37ed7ae38ddd09ce2633a5824320097
3 years ago
..
publicdns
resolvconffile all: use strs.CutPrefix and strs.CutSuffix more 3 years ago
resolver all: use strs.CutPrefix and strs.CutSuffix more 3 years ago
config.go
debian_resolvconf.go
direct.go net/dns: add a health warning when Linux /etc/resolv.conf is overwritten 3 years ago
direct_linux.go
direct_notlinux.go
direct_test.go
flush_default.go
flush_windows.go
ini.go
ini_test.go
manager.go net/dns: don't send on closed channel when message too large 3 years ago
manager_darwin.go
manager_default.go
manager_freebsd.go
manager_linux.go net/dns: [linux] log and add metric for dnsMode 3 years ago
manager_linux_test.go
manager_openbsd.go
manager_tcp_test.go net/dns: don't send on closed channel when message too large 3 years ago
manager_test.go
manager_windows.go net/dns: retry overwriting hosts file on Windows 3 years ago
manager_windows_test.go net/dns: change windows DNS manager to use pointer receiver 3 years ago
nm.go util/endian: delete package; use updated josharian/native instead 3 years ago
noop.go
nrpt_windows.go
openresolv.go
osconfig.go
osconfig_test.go
resolvconf-workaround.sh
resolvconf.go
resolvd.go
resolved.go
utf.go
utf_test.go
wsl_windows.go