mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 23:07:44 +00:00
net/dnscache: fix v4addrs to return only v4 addrs
Update the v4addrs function to filter out IPv6 addresses. Fixes regression from 8725b14056. Signed-off-by: Kris Brandow <kris.brandow@gmail.com>
This commit is contained in:
parent
03f7e4e577
commit
9ae1161e85
@ -614,7 +614,7 @@ func v4addrs(aa []net.IPAddr) (ret []netip.Addr) {
|
||||
for _, a := range aa {
|
||||
ip, ok := netip.AddrFromSlice(a.IP)
|
||||
ip = ip.Unmap()
|
||||
if ok {
|
||||
if ok && ip.Is4() {
|
||||
ret = append(ret, ip)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user