Revert "ipv4, ipv6, internal/netreflect, bpf: fix the x/net build"

This reverts https://go-review.googlesource.com/c/37401

Updates golang/go#19051.

Change-Id: Ia3cbc42213e3c519f91650e6308a7ca1f56b6189
Reviewed-on: https://go-review.googlesource.com/37417
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/bpf/vm_bpf_test.go b/bpf/vm_bpf_test.go
index 76dd970..77fa8fe 100644
--- a/bpf/vm_bpf_test.go
+++ b/bpf/vm_bpf_test.go
@@ -149,9 +149,6 @@
 
 	p := ipv4.NewPacketConn(l)
 	if err = p.SetBPF(prog); err != nil {
-		if err.Error() == "operation not supported" { // TODO: gross. remove once 19051 fixed.
-			t.Skip("Skipping until Issue 19051 is fixed.")
-		}
 		t.Fatalf("failed to attach BPF program to listener: %v", err)
 	}
 
diff --git a/internal/netreflect/socket_19.go b/internal/netreflect/socket_19.go
deleted file mode 100644
index 74df52e..0000000
--- a/internal/netreflect/socket_19.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2017 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.
-
-// +build go1.9
-
-package netreflect
-
-import (
-	"errors"
-	"net"
-)
-
-var (
-	errInvalidType = errors.New("invalid type")
-	errOpNoSupport = errors.New("operation not supported")
-)
-
-// SocketOf returns the socket descriptor of c.
-func SocketOf(c net.Conn) (uintptr, error) {
-	switch c.(type) {
-	case *net.TCPConn, *net.UDPConn, *net.IPConn, *net.UnixConn:
-		return 0, errOpNoSupport
-	default:
-		return 0, errInvalidType
-	}
-}
-
-// PacketSocketOf returns the socket descriptor of c.
-func PacketSocketOf(c net.PacketConn) (uintptr, error) {
-	switch c.(type) {
-	case *net.UDPConn, *net.IPConn, *net.UnixConn:
-		return 0, errOpNoSupport
-	default:
-		return 0, errInvalidType
-	}
-}
diff --git a/ipv4/go19_test.go b/ipv4/go19_test.go
deleted file mode 100644
index 82a27b1..0000000
--- a/ipv4/go19_test.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2017 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.
-
-// +build go1.9
-
-package ipv4
-
-func init() {
-	disableTests = true
-}
diff --git a/ipv4/ipv4_test.go b/ipv4/ipv4_test.go
deleted file mode 100644
index 9172992..0000000
--- a/ipv4/ipv4_test.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 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.
-
-package ipv4
-
-import (
-	"fmt"
-	"os"
-	"testing"
-)
-
-var disableTests = false
-
-func TestMain(m *testing.M) {
-	if disableTests {
-		fmt.Fprintf(os.Stderr, "ipv4 tests disabled in Go 1.9 until netreflect is fixed. (Issue 19051)\n")
-		os.Exit(0)
-	}
-	// call flag.Parse() here if TestMain uses flags
-	os.Exit(m.Run())
-}
diff --git a/ipv6/go19_test.go b/ipv6/go19_test.go
deleted file mode 100644
index c7cb057..0000000
--- a/ipv6/go19_test.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2017 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.
-
-// +build go1.9
-
-package ipv6
-
-func init() {
-	disableTests = true
-}
diff --git a/ipv6/ipv6_test.go b/ipv6/ipv6_test.go
deleted file mode 100644
index 8d2d235..0000000
--- a/ipv6/ipv6_test.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 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.
-
-package ipv6
-
-import (
-	"fmt"
-	"os"
-	"testing"
-)
-
-var disableTests = false
-
-func TestMain(m *testing.M) {
-	if disableTests {
-		fmt.Fprintf(os.Stderr, "ipv6 tests disabled in Go 1.9 until netreflect is fixed (Issue 19051)\n")
-		os.Exit(0)
-	}
-	// call flag.Parse() here if TestMain uses flags
-	os.Exit(m.Run())
-}