mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
wgengine/magicsock: make legacy DstToString match Addrs
DstToString is used in two places in wireguard-go: Logging and uapi. We are switching to use uapi for wireguard-go config. To preserve existing behavior, we need the full set of addrs. And for logging, having the full set of addrs seems useful. (The Addrs method itself is slated for removal. When that happens, the implementation will move to DstToString.) Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
187e22a756
commit
d3dd7c6270
@ -438,8 +438,7 @@ func (a *addrSet) DstToBytes() []byte {
|
||||
return packIPPort(a.dst())
|
||||
}
|
||||
func (a *addrSet) DstToString() string {
|
||||
dst := a.dst()
|
||||
return dst.String()
|
||||
return a.Addrs()
|
||||
}
|
||||
func (a *addrSet) DstIP() net.IP {
|
||||
return a.dst().IP.IPAddr().IP // TODO: add netaddr accessor to cut an alloc here?
|
||||
|
Loading…
x
Reference in New Issue
Block a user