net/netcheck: test for OS IPv6 support as well as connectivity.
This lets us distinguish "no IPv6 because the device's ISP doesn't offer IPv6" from "IPv6 is unavailable/disabled in the OS". Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
committed by
Dave Anderson
parent
4c0feba38e
commit
c1cb3efbba
+7
-2
@@ -496,10 +496,14 @@ type NetInfo struct {
|
||||
// It reports true even if there's no NAT involved.
|
||||
HairPinning opt.Bool
|
||||
|
||||
// WorkingIPv6 is whether IPv6 works.
|
||||
// WorkingIPv6 is whether the host has IPv6 internet connectivity.
|
||||
WorkingIPv6 opt.Bool
|
||||
|
||||
// WorkingUDP is whether UDP works.
|
||||
// OSHasIPv6 is whether the OS supports IPv6 at all, regardless of
|
||||
// whether IPv6 internet connectivity is available.
|
||||
OSHasIPv6 opt.Bool
|
||||
|
||||
// WorkingUDP is whether the host has UDP internet connectivity.
|
||||
WorkingUDP opt.Bool
|
||||
|
||||
// HavePortMap is whether we have an existing portmap open
|
||||
@@ -590,6 +594,7 @@ func (ni *NetInfo) BasicallyEqual(ni2 *NetInfo) bool {
|
||||
return ni.MappingVariesByDestIP == ni2.MappingVariesByDestIP &&
|
||||
ni.HairPinning == ni2.HairPinning &&
|
||||
ni.WorkingIPv6 == ni2.WorkingIPv6 &&
|
||||
ni.OSHasIPv6 == ni2.OSHasIPv6 &&
|
||||
ni.WorkingUDP == ni2.WorkingUDP &&
|
||||
ni.HavePortMap == ni2.HavePortMap &&
|
||||
ni.UPnP == ni2.UPnP &&
|
||||
|
||||
Reference in New Issue
Block a user