From b7f1fe7b0d53de487274392148fd8612a9e5c25f Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 19 Jul 2022 21:15:48 -0700 Subject: [PATCH] tailcfg: remove old DNS fields The control plane server doesn't send these to modern clients so we don't need them in the tree. The server has its own serialization code to generate legacy MapResponses when needed. Change-Id: Idd1e5d96ddf9d4306f2da550d20b77f0c252817a Signed-off-by: Brad Fitzpatrick --- control/controlclient/map.go | 6 ------ tailcfg/tailcfg.go | 8 -------- 2 files changed, 14 deletions(-) diff --git a/control/controlclient/map.go b/control/controlclient/map.go index c7bb8db76..d436064ad 100644 --- a/control/controlclient/map.go +++ b/control/controlclient/map.go @@ -165,12 +165,6 @@ func (ms *mapSession) netmapForResponse(resp *tailcfg.MapResponse) *netmap.Netwo } ms.addUserProfile(peer.User) } - if len(resp.DNS) > 0 { - nm.DNS.Nameservers = resp.DNS - } - if len(resp.SearchPaths) > 0 { - nm.DNS.Domains = resp.SearchPaths - } if Debug.ProxyDNS { nm.DNS.Proxied = true } diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index ae39a5362..18015155e 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -1245,14 +1245,6 @@ type MapResponse struct { // OnlineChange changes the value of a Peer Node.Online value. OnlineChange map[NodeID]bool `json:",omitempty"` - // DNS is the same as DNSConfig.Nameservers. - // Only populated if MapRequest.Version < 9. - DNS []netaddr.IP `json:",omitempty"` - - // SearchPaths is the old way to specify DNS search domains. - // Only populated if MapRequest.Version < 9. - SearchPaths []string `json:",omitempty"` - // DNSConfig contains the DNS settings for the client to use. // A nil value means no change from an earlier non-nil value. DNSConfig *DNSConfig `json:",omitempty"`