wgengine/magicsock: stop retaining *netmap.NetworkMap

We're trying to start using that monster type less and eventually get
rid of it.

Updates #1909

Change-Id: I8e1e725bce5324fb820a9be6c7952767863e6542
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2023-09-11 19:17:24 -07:00
committed by Brad Fitzpatrick
parent f06e64c562
commit ff6fadddb6
3 changed files with 56 additions and 27 deletions

View File

@@ -102,10 +102,9 @@ func (c *Conn) ServeHTTPDebug(w http.ResponseWriter, r *http.Request) {
sort.Slice(ent, func(i, j int) bool { return ent[i].pub.Less(ent[j].pub) })
peers := map[key.NodePublic]tailcfg.NodeView{}
if c.netMap != nil {
for _, p := range c.netMap.Peers {
peers[p.Key()] = p
}
for i := range c.peers.LenIter() {
p := c.peers.At(i)
peers[p.Key()] = p
}
for _, e := range ent {