vendor: Update golang.org/x/net/ipv6

This commit is contained in:
Jakob Borg
2017-03-04 07:28:11 +01:00
parent 566c348b00
commit 7260629bc0
81 changed files with 1296 additions and 820 deletions

View File

@@ -1,4 +1,4 @@
// Copyright 2013 The Go Authors. All rights reserved.
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -16,7 +16,7 @@ import (
func TestConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {
@@ -29,8 +29,15 @@ func TestConnUnicastSocketOptions(t *testing.T) {
}
defer ln.Close()
done := make(chan bool)
go acceptor(t, ln, done)
errc := make(chan error, 1)
go func() {
c, err := ln.Accept()
if err != nil {
errc <- err
return
}
errc <- c.Close()
}()
c, err := net.Dial("tcp6", ln.Addr().String())
if err != nil {
@@ -40,7 +47,9 @@ func TestConnUnicastSocketOptions(t *testing.T) {
testUnicastSocketOptions(t, ipv6.NewConn(c))
<-done
if err := <-errc; err != nil {
t.Errorf("server: %v", err)
}
}
var packetConnUnicastSocketOptionTests = []struct {
@@ -52,7 +61,7 @@ var packetConnUnicastSocketOptionTests = []struct {
func TestPacketConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "solaris", "windows":
case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !supportsIPv6 {