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
@ -15,7 +15,6 @@ import (
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
"golang.zx2c4.com/wireguard/windows/tunnel/winipcfg"
|
||||
"tailscale.com/net/netaddr"
|
||||
"tailscale.com/tsconst"
|
||||
)
|
||||
|
||||
@ -65,11 +64,12 @@ func likelyHomeRouterIPWindows() (ret netip.Addr, ok bool) {
|
||||
continue
|
||||
}
|
||||
|
||||
ip, ok := netaddr.FromStdIP(r.NextHop.IP())
|
||||
ip, ok := netip.AddrFromSlice(r.NextHop.IP())
|
||||
if !ok {
|
||||
// Not a valid gateway, so skip (won't happen though)
|
||||
continue
|
||||
}
|
||||
ip = ip.Unmap()
|
||||
|
||||
if best == nil {
|
||||
best = r
|
||||
|
Reference in New Issue
Block a user