mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-14 01:11:01 +00:00
wgengine/magicsock: don't report v4 localhost addresses on IPv6-only systems
Updates #376
This commit is contained in:
parent
fff062b461
commit
a428656280
@ -547,9 +547,10 @@ func (c *Conn) determineEndpoints(ctx context.Context) (ipPorts []string, reason
|
||||
return nil, nil, err
|
||||
}
|
||||
reason := "localAddresses"
|
||||
if len(ips) == 0 {
|
||||
if len(ips) == 0 && len(eps) == 0 {
|
||||
// Only include loopback addresses if we have no
|
||||
// interfaces at all to use as endpoints. This allows
|
||||
// interfaces at all to use as endpoints and don't
|
||||
// have a public IPv4 or IPv6 address. This allows
|
||||
// for localhost testing when you're on a plane and
|
||||
// offline, for example.
|
||||
ips = loopback
|
||||
|
Loading…
x
Reference in New Issue
Block a user