mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 13:18:53 +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:
@@ -114,7 +114,8 @@ type CapabilityVersion int
|
||||
// - 72: 2023-08-23: TS-2023-006 UPnP issue fixed; UPnP can now be used again
|
||||
// - 73: 2023-09-01: Non-Windows clients expect to receive ClientVersion
|
||||
// - 74: 2023-09-18: Client understands NodeCapMap
|
||||
const CurrentCapabilityVersion CapabilityVersion = 74
|
||||
// - 75: 2023-09-12: Client understands NodeAttrDNSForwarderDisableTCPRetries
|
||||
const CurrentCapabilityVersion CapabilityVersion = 75
|
||||
|
||||
type StableID string
|
||||
|
||||
@@ -2137,6 +2138,10 @@ const (
|
||||
// NodeAttrPeerMTUEnable makes the client do path MTU discovery to its
|
||||
// peers. If it isn't set, it defaults to the client default.
|
||||
NodeAttrPeerMTUEnable NodeCapability = "peer-mtu-enable"
|
||||
|
||||
// NodeAttrDNSForwarderDisableTCPRetries disables retrying truncated
|
||||
// DNS queries over TCP if the response is truncated.
|
||||
NodeAttrDNSForwarderDisableTCPRetries NodeCapability = "dns-forwarder-disable-tcp-retries"
|
||||
)
|
||||
|
||||
// SetDNSRequest is a request to add a DNS record.
|
||||
|
Reference in New Issue
Block a user