summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/network/arp
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-05-01 22:50:55 -0700
committerShentubot <shentubot@google.com>2018-05-01 22:51:41 -0700
commiteb5414ee29f20b1805345820e6174afff84276c2 (patch)
treeec1573b6c72dd90e2d97af6f6ea04cc1f8654311 /pkg/tcpip/network/arp
parent65df95516898f077cda44ace15e45e4c777fdaf3 (diff)
Add support for ping sockets
PiperOrigin-RevId: 195049322 Change-Id: I09f6dd58cf10a2e50e53d17d2823d540102913c5
Diffstat (limited to 'pkg/tcpip/network/arp')
-rw-r--r--pkg/tcpip/network/arp/BUILD1
-rw-r--r--pkg/tcpip/network/arp/arp_test.go3
2 files changed, 3 insertions, 1 deletions
diff --git a/pkg/tcpip/network/arp/BUILD b/pkg/tcpip/network/arp/BUILD
index e6d0899a9..58d174965 100644
--- a/pkg/tcpip/network/arp/BUILD
+++ b/pkg/tcpip/network/arp/BUILD
@@ -30,5 +30,6 @@ go_test(
"//pkg/tcpip/link/sniffer",
"//pkg/tcpip/network/ipv4",
"//pkg/tcpip/stack",
+ "//pkg/tcpip/transport/ping",
],
)
diff --git a/pkg/tcpip/network/arp/arp_test.go b/pkg/tcpip/network/arp/arp_test.go
index 47b10e64e..6d61ff1d7 100644
--- a/pkg/tcpip/network/arp/arp_test.go
+++ b/pkg/tcpip/network/arp/arp_test.go
@@ -16,6 +16,7 @@ import (
"gvisor.googlesource.com/gvisor/pkg/tcpip/network/arp"
"gvisor.googlesource.com/gvisor/pkg/tcpip/network/ipv4"
"gvisor.googlesource.com/gvisor/pkg/tcpip/stack"
+ "gvisor.googlesource.com/gvisor/pkg/tcpip/transport/ping"
)
const (
@@ -32,7 +33,7 @@ type testContext struct {
}
func newTestContext(t *testing.T) *testContext {
- s := stack.New(&tcpip.StdClock{}, []string{ipv4.ProtocolName, arp.ProtocolName}, []string{ipv4.PingProtocolName})
+ s := stack.New(&tcpip.StdClock{}, []string{ipv4.ProtocolName, arp.ProtocolName}, []string{ping.ProtocolName4})
const defaultMTU = 65536
id, linkEP := channel.New(256, defaultMTU, stackLinkAddr)