diff options
author | Kevin Krakauer <krakauer@google.com> | 2019-09-25 12:56:00 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-09-25 12:57:05 -0700 |
commit | 59ccbb10446063f5347fb026e35549bc2f677971 (patch) | |
tree | 375679720cfe149976d0f06f7d6d9aa727f780b0 /pkg/tcpip/transport/udp/udp_test.go | |
parent | 99c86b8dbdaaaba8724d9946d3137c5f9303d51e (diff) |
Remove centralized registration of protocols.
Also removes the need for protocol names.
PiperOrigin-RevId: 271186030
Diffstat (limited to 'pkg/tcpip/transport/udp/udp_test.go')
-rw-r--r-- | pkg/tcpip/transport/udp/udp_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/udp/udp_test.go b/pkg/tcpip/transport/udp/udp_test.go index c6deab892..2ec27be4d 100644 --- a/pkg/tcpip/transport/udp/udp_test.go +++ b/pkg/tcpip/transport/udp/udp_test.go @@ -274,7 +274,10 @@ type testContext struct { func newDualTestContext(t *testing.T, mtu uint32) *testContext { t.Helper() - s := stack.New([]string{ipv4.ProtocolName, ipv6.ProtocolName}, []string{udp.ProtocolName}, stack.Options{}) + s := stack.New(stack.Options{ + NetworkProtocols: []stack.NetworkProtocol{ipv4.NewProtocol(), ipv6.NewProtocol()}, + TransportProtocols: []stack.TransportProtocol{udp.NewProtocol()}, + }) ep := channel.New(256, mtu, "") wep := stack.LinkEndpoint(ep) |