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:
David Anderson
2022-07-18 16:56:10 -07:00
committed by Dave Anderson
parent 4c0feba38e
commit c1cb3efbba
7 changed files with 26 additions and 3 deletions
+3
View File
@@ -111,6 +111,9 @@ func TestWorksWhenUDPBlocked(t *testing.T) {
// That's not relevant to this test, so just accept what we're
// given.
want.IPv4CanSend = r.IPv4CanSend
// OS IPv6 test is irrelevant here, accept whatever the current
// machine has.
want.OSHasIPv6 = r.OSHasIPv6
if !reflect.DeepEqual(r, want) {
t.Errorf("mismatch\n got: %+v\nwant: %+v\n", r, want)