diff --git a/control/controlclient/direct.go b/control/controlclient/direct.go index 1735f92db..b89b31581 100644 --- a/control/controlclient/direct.go +++ b/control/controlclient/direct.go @@ -18,7 +18,6 @@ import ( "net/http" "os" "runtime" - "strconv" "strings" "sync" "time" @@ -564,14 +563,6 @@ func (c *Direct) PollNetMap(ctx context.Context, maxPolls int, cb func(*NetworkM Hostinfo: resp.Node.Hostinfo, PacketFilter: resp.PacketFilter, } - // Temporary (2020-02-21) knob to force debug, during DERP testing: - if ok, _ := strconv.ParseBool(os.Getenv("DEBUG_FORCE_DERP")); ok { - c.logf("debug: adding DERP endpoints to all peers") - for i := range nm.Peers { - peer := &nm.Peers[i] - peer.Endpoints = append([]string{"127.3.3.40:1"}, peer.Endpoints...) - } - } for _, profile := range resp.UserProfiles { nm.UserProfiles[profile.ID] = profile } diff --git a/control/controlclient/netmap.go b/control/controlclient/netmap.go index a31cb8d22..ae700512a 100644 --- a/control/controlclient/netmap.go +++ b/control/controlclient/netmap.go @@ -28,7 +28,7 @@ type NetworkMap struct { Addresses []wgcfg.CIDR LocalPort uint16 // used for debugging MachineStatus tailcfg.MachineStatus - Peers []tailcfg.Node + Peers []*tailcfg.Node DNS []wgcfg.IP DNSDomains []string Hostinfo tailcfg.Hostinfo diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index f096d24cf..8804557c4 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -404,8 +404,8 @@ type MapResponse struct { KeepAlive bool // if set, all other fields are ignored // Networking - Node Node - Peers []Node + Node *Node + Peers []*Node DNS []wgcfg.IP SearchPaths []string