ipv6: make use of nettest.SupportsRawIPSocket

Change-Id: I3cf716c9ae02d7daa0d5a11249c3b58f6c8be2fe
Reviewed-on: https://go-review.googlesource.com/3403
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/ipv6/multicastsockopt_test.go b/ipv6/multicastsockopt_test.go
index 72e68a0..bf59750 100644
--- a/ipv6/multicastsockopt_test.go
+++ b/ipv6/multicastsockopt_test.go
@@ -6,7 +6,6 @@
 
 import (
 	"net"
-	"os"
 	"runtime"
 	"testing"
 
@@ -38,9 +37,10 @@
 		t.Skipf("not available on %q", runtime.GOOS)
 	}
 
+	m, ok := nettest.SupportsRawIPSocket()
 	for _, tt := range packetConnMulticastSocketOptionTests {
-		if tt.net == "ip6" && os.Getuid() != 0 {
-			t.Log("must be root")
+		if tt.net == "ip6" && !ok {
+			t.Log(m)
 			continue
 		}
 		c, err := net.ListenPacket(tt.net+tt.proto, tt.addr)