diff options
author | Ian Gudger <igudger@google.com> | 2019-09-06 17:59:46 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-09-06 18:01:14 -0700 |
commit | fe1f5210774d015d653df164d6f676658863780c (patch) | |
tree | b664a262a42316af5bd65f0584fefdd890a2d4e0 /pkg/tcpip/network/arp | |
parent | 9e1cbdf565a1f5bf5bbc84bad0103fe2289e817c (diff) |
Remove reundant global tcpip.LinkEndpointID.
PiperOrigin-RevId: 267709597
Diffstat (limited to 'pkg/tcpip/network/arp')
-rw-r--r-- | pkg/tcpip/network/arp/arp_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pkg/tcpip/network/arp/arp_test.go b/pkg/tcpip/network/arp/arp_test.go index 4c4b54469..387fca96e 100644 --- a/pkg/tcpip/network/arp/arp_test.go +++ b/pkg/tcpip/network/arp/arp_test.go @@ -47,11 +47,13 @@ func newTestContext(t *testing.T) *testContext { s := stack.New([]string{ipv4.ProtocolName, arp.ProtocolName}, []string{icmp.ProtocolName4}, stack.Options{}) const defaultMTU = 65536 - id, linkEP := channel.New(256, defaultMTU, stackLinkAddr) + ep := channel.New(256, defaultMTU, stackLinkAddr) + wep := stack.LinkEndpoint(ep) + if testing.Verbose() { - id = sniffer.New(id) + wep = sniffer.New(ep) } - if err := s.CreateNIC(1, id); err != nil { + if err := s.CreateNIC(1, wep); err != nil { t.Fatalf("CreateNIC failed: %v", err) } @@ -73,7 +75,7 @@ func newTestContext(t *testing.T) *testContext { return &testContext{ t: t, s: s, - linkEP: linkEP, + linkEP: ep, } } |