mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
all: migrate more code code to net/netip directly
Instead of going through the tailscale.com/net/netaddr transitional wrappers. Updates #5162 Change-Id: I3dafd1c2effa1a6caa9b7151ecf6edd1a3fda3dd Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
eb32847d85
commit
8725b14056
@@ -36,7 +36,6 @@ import (
|
||||
"tailscale.com/envknob"
|
||||
"tailscale.com/ipn/ipnlocal"
|
||||
"tailscale.com/logtail/backoff"
|
||||
"tailscale.com/net/netaddr"
|
||||
"tailscale.com/net/tsaddr"
|
||||
"tailscale.com/syncs"
|
||||
"tailscale.com/tailcfg"
|
||||
@@ -410,11 +409,11 @@ func toIPPort(a net.Addr) (ipp netip.AddrPort) {
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
tanetaddr, ok := netaddr.FromStdIP(ta.IP)
|
||||
tanetaddr, ok := netip.AddrFromSlice(ta.IP)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
return netip.AddrPortFrom(tanetaddr, uint16(ta.Port))
|
||||
return netip.AddrPortFrom(tanetaddr.Unmap(), uint16(ta.Port))
|
||||
}
|
||||
|
||||
// connInfo returns a populated sshConnInfo from the provided arguments,
|
||||
|
Reference in New Issue
Block a user