mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
types/netmap: start phasing out Addresses, add GetAddresses method
NetworkMap.Addresses is redundant with the SelfNode.Addresses. This works towards a TODO to delete NetworkMap.Addresses and replace it with a method. This is similar to #9389. Updates #cleanup Change-Id: Id000509ca5d16bb636401763d41bdb5f38513ba0 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
fb5ceb03e3
commit
926c990a09
@@ -1816,8 +1816,8 @@ func (c *Conn) SetNetworkMap(nm *netmap.NetworkMap) {
|
||||
c.peers = curPeers
|
||||
|
||||
flags := c.debugFlagsLocked()
|
||||
if len(nm.Addresses) > 0 {
|
||||
c.firstAddrForTest = nm.Addresses[0].Addr()
|
||||
if addrs := nm.GetAddresses(); addrs.Len() > 0 {
|
||||
c.firstAddrForTest = addrs.At(0).Addr()
|
||||
} else {
|
||||
c.firstAddrForTest = netip.Addr{}
|
||||
}
|
||||
|
Reference in New Issue
Block a user