mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-07 08:07:42 +00:00
wgengine: don't try pinging IPv6 addresses in legacy pinger.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
dfbde3d3aa
commit
be6fe393c5
@ -515,6 +515,13 @@ func (p *pinger) run(ctx context.Context, peerKey wgcfg.Key, ips []wgcfg.IP, src
|
|||||||
start := time.Now()
|
start := time.Now()
|
||||||
var dstIPs []packet.IP4
|
var dstIPs []packet.IP4
|
||||||
for _, ip := range ips {
|
for _, ip := range ips {
|
||||||
|
if ip.Is6() {
|
||||||
|
// This code is only used for legacy (pre-discovery)
|
||||||
|
// peers. They're not going to work right with IPv6 on the
|
||||||
|
// overlay anyway, so don't bother trying to make ping
|
||||||
|
// work.
|
||||||
|
continue
|
||||||
|
}
|
||||||
dstIPs = append(dstIPs, packet.IP4FromNetaddr(netaddr.IPFrom16(ip.Addr)))
|
dstIPs = append(dstIPs, packet.IP4FromNetaddr(netaddr.IPFrom16(ip.Addr)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user