summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorArthur Sfez <asfez@google.com>2021-01-13 10:19:35 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-13 10:21:53 -0800
commit0f25aa24f9f0502bfb1fbead37bbbc2a012dfd64 (patch)
treebad762d76ed50aff521c42417488042d9adf1097 /pkg
parentaab7d75bd8b7bf1b7f9e58d3d104a9e225918c30 (diff)
Clean up the dummy network interface used by UDP tests
It is now composed by a NetworkInterface interface which lets us delete the methods we don't need. PiperOrigin-RevId: 351613267
Diffstat (limited to 'pkg')
-rw-r--r--pkg/tcpip/transport/udp/udp_test.go18
1 files changed, 1 insertions, 17 deletions
diff --git a/pkg/tcpip/transport/udp/udp_test.go b/pkg/tcpip/transport/udp/udp_test.go
index 455b8c2aa..c8da173f1 100644
--- a/pkg/tcpip/transport/udp/udp_test.go
+++ b/pkg/tcpip/transport/udp/udp_test.go
@@ -1560,33 +1560,17 @@ func TestNoChecksum(t *testing.T) {
var _ stack.NetworkInterface = (*testInterface)(nil)
type testInterface struct {
- stack.NetworkLinkEndpoint
+ stack.NetworkInterface
}
func (*testInterface) ID() tcpip.NICID {
return 0
}
-func (*testInterface) IsLoopback() bool {
- return false
-}
-
-func (*testInterface) Name() string {
- return ""
-}
-
func (*testInterface) Enabled() bool {
return true
}
-func (*testInterface) Promiscuous() bool {
- return false
-}
-
-func (*testInterface) WritePacketToRemote(tcpip.LinkAddress, *stack.GSO, tcpip.NetworkProtocolNumber, *stack.PacketBuffer) *tcpip.Error {
- return tcpip.ErrNotSupported
-}
-
func TestTTL(t *testing.T) {
for _, flow := range []testFlow{unicastV4, unicastV4in6, unicastV6, unicastV6Only, multicastV4, multicastV4in6, multicastV6, broadcast, broadcastIn6} {
t.Run(fmt.Sprintf("flow:%s", flow), func(t *testing.T) {