Ver código fonte

go.net/ipv6: add support for dragonfly

Update golang/go#7174

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/91770049
Mikio Hara 11 anos atrás
pai
commit
9704df9680

+ 1 - 1
ipv6/control_rfc3542_stub.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build dragonfly plan9 solaris
+// +build plan9 solaris
 
 package ipv6
 

+ 1 - 1
ipv6/control_rfc3542_unix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build freebsd linux netbsd openbsd
+// +build dragonfly freebsd linux netbsd openbsd
 
 package ipv6
 

+ 1 - 1
ipv6/dgramopt_posix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin freebsd linux netbsd openbsd windows
+// +build darwin dragonfly freebsd linux netbsd openbsd windows
 
 package ipv6
 

+ 1 - 1
ipv6/dgramopt_stub.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build dragonfly plan9 solaris
+// +build plan9 solaris
 
 package ipv6
 

+ 1 - 1
ipv6/genericopt_posix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin freebsd linux netbsd openbsd windows
+// +build darwin dragonfly freebsd linux netbsd openbsd windows
 
 package ipv6
 

+ 1 - 1
ipv6/genericopt_stub.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build dragonfly plan9 solaris
+// +build plan9 solaris
 
 package ipv6
 

+ 1 - 1
ipv6/helper_stub.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build dragonfly plan9 solaris
+// +build plan9 solaris
 
 package ipv6
 

+ 1 - 1
ipv6/helper_unix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin freebsd linux netbsd openbsd
+// +build darwin dragonfly freebsd linux netbsd openbsd
 
 package ipv6
 

+ 1 - 1
ipv6/icmp_bsd.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin freebsd netbsd openbsd
+// +build darwin dragonfly freebsd netbsd openbsd
 
 package ipv6
 

+ 1 - 1
ipv6/icmp_stub.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build dragonfly plan9 solaris
+// +build plan9 solaris
 
 package ipv6
 

+ 2 - 2
ipv6/icmp_test.go

@@ -34,7 +34,7 @@ func TestICMPString(t *testing.T) {
 
 func TestICMPFilter(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 
@@ -67,7 +67,7 @@ func TestICMPFilter(t *testing.T) {
 
 func TestSetICMPFilter(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {

+ 2 - 2
ipv6/multicast_test.go

@@ -19,7 +19,7 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
 	case "freebsd": // due to a bug on loopback marking
 		// See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065.
 		t.Skipf("not supported on %q", runtime.GOOS)
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {
@@ -97,7 +97,7 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) {
 
 func TestPacketConnReadWriteMulticastICMP(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {

+ 4 - 4
ipv6/multicastlistener_test.go

@@ -21,7 +21,7 @@ var udpMultipleGroupListenerTests = []net.Addr{
 
 func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {
@@ -61,7 +61,7 @@ func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) {
 
 func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {
@@ -113,7 +113,7 @@ func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
 
 func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {
@@ -156,7 +156,7 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
 
 func TestIPSinglePacketConnWithSingleGroupListener(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {

+ 1 - 1
ipv6/multicastsockopt_test.go

@@ -22,7 +22,7 @@ var packetConnMulticastSocketOptionTests = []struct {
 
 func TestPacketConnMulticastSocketOptions(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {

+ 1 - 1
ipv6/readwrite_test.go

@@ -90,7 +90,7 @@ func benchmarkReadWriteIPv6UDP(b *testing.B, p *ipv6.PacketConn, wb, rb []byte,
 
 func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {

+ 1 - 1
ipv6/sockopt_rfc3493_bsd.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin freebsd netbsd openbsd
+// +build darwin dragonfly freebsd netbsd openbsd
 
 package ipv6
 

+ 1 - 1
ipv6/sockopt_rfc3493_unix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin freebsd linux netbsd openbsd
+// +build darwin dragonfly freebsd linux netbsd openbsd
 
 package ipv6
 

+ 1 - 1
ipv6/sockopt_rfc3542_stub.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build dragonfly plan9 solaris
+// +build plan9 solaris
 
 package ipv6
 

+ 1 - 1
ipv6/sockopt_rfc3542_unix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build freebsd linux netbsd openbsd
+// +build dragonfly freebsd linux netbsd openbsd
 
 package ipv6
 

+ 4 - 4
ipv6/sockopt_test.go

@@ -24,7 +24,7 @@ func init() {
 var condFatalf = func() func(*testing.T, string, ...interface{}) {
 	// A few APIs are not implemented yet on some platforms.
 	switch runtime.GOOS {
-	case "darwin", "dragonfly", "plan9", "solaris", "windows":
+	case "darwin", "plan9", "solaris", "windows":
 		return (*testing.T).Logf
 	}
 	return (*testing.T).Fatalf
@@ -32,7 +32,7 @@ var condFatalf = func() func(*testing.T, string, ...interface{}) {
 
 func TestConnInitiatorPathMTU(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {
@@ -65,7 +65,7 @@ func TestConnInitiatorPathMTU(t *testing.T) {
 
 func TestConnResponderPathMTU(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {
@@ -98,7 +98,7 @@ func TestConnResponderPathMTU(t *testing.T) {
 
 func TestPacketConnChecksum(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {

+ 1 - 1
ipv6/sys_bsd.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build freebsd netbsd openbsd
+// +build dragonfly freebsd netbsd openbsd
 
 package ipv6
 

+ 1 - 1
ipv6/sys_unix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin freebsd linux netbsd openbsd
+// +build darwin dragonfly freebsd linux netbsd openbsd
 
 package ipv6
 

+ 1 - 1
ipv6/syscall_unix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin freebsd linux,amd64 linux,arm netbsd openbsd
+// +build darwin dragonfly freebsd linux,amd64 linux,arm netbsd openbsd
 
 package ipv6
 

+ 2 - 2
ipv6/unicast_test.go

@@ -16,7 +16,7 @@ import (
 
 func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {
@@ -77,7 +77,7 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
 
 func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {

+ 2 - 2
ipv6/unicastsockopt_test.go

@@ -14,7 +14,7 @@ import (
 
 func TestConnUnicastSocketOptions(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {
@@ -50,7 +50,7 @@ var packetConnUnicastSocketOptionTests = []struct {
 
 func TestPacketConnUnicastSocketOptions(t *testing.T) {
 	switch runtime.GOOS {
-	case "dragonfly", "plan9", "solaris", "windows":
+	case "plan9", "solaris", "windows":
 		t.Skipf("not supported on %q", runtime.GOOS)
 	}
 	if !supportsIPv6 {