mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-09 08:01:31 +00:00
net/dns: retry forwarder requests over TCP
We weren't correctly retrying truncated requests to an upstream DNS server with TCP. Instead, we'd return a truncated request to the user, even if the user was querying us over TCP and thus able to handle a large response. Also, add an envknob and controlknob to allow users/us to disable this behaviour if it turns out to be buggy (✨ DNS ✨). Updates #9264 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: Ifb04b563839a9614c0ba03e9c564e8924c1a2bfd
This commit is contained in:
@@ -20,11 +20,12 @@ func _() {
|
||||
_ = x[LabelMagicsockConnUDP6-9]
|
||||
_ = x[LabelNetlogLogger-10]
|
||||
_ = x[LabelSockstatlogLogger-11]
|
||||
_ = x[LabelDNSForwarderTCP-12]
|
||||
}
|
||||
|
||||
const _Label_name = "ControlClientAutoControlClientDialerDERPHTTPClientLogtailLoggerDNSForwarderDoHDNSForwarderUDPNetcheckClientPortmapperClientMagicsockConnUDP4MagicsockConnUDP6NetlogLoggerSockstatlogLogger"
|
||||
const _Label_name = "ControlClientAutoControlClientDialerDERPHTTPClientLogtailLoggerDNSForwarderDoHDNSForwarderUDPNetcheckClientPortmapperClientMagicsockConnUDP4MagicsockConnUDP6NetlogLoggerSockstatlogLoggerDNSForwarderTCP"
|
||||
|
||||
var _Label_index = [...]uint8{0, 17, 36, 50, 63, 78, 93, 107, 123, 140, 157, 169, 186}
|
||||
var _Label_index = [...]uint8{0, 17, 36, 50, 63, 78, 93, 107, 123, 140, 157, 169, 186, 201}
|
||||
|
||||
func (i Label) String() string {
|
||||
if i >= Label(len(_Label_index)-1) {
|
||||
|
@@ -51,6 +51,7 @@ const (
|
||||
LabelMagicsockConnUDP6 Label = 9 // wgengine/magicsock/magicsock.go
|
||||
LabelNetlogLogger Label = 10 // wgengine/netlog/logger.go
|
||||
LabelSockstatlogLogger Label = 11 // log/sockstatlog/logger.go
|
||||
LabelDNSForwarderTCP Label = 12 // net/dns/resolver/forwarder.go
|
||||
)
|
||||
|
||||
// WithSockStats instruments a context so that sockets created with it will
|
||||
|
Reference in New Issue
Block a user