diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2021-08-27 11:12:08 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-08-27 11:15:23 -0700 |
commit | fbf020d6a0258275a68573032bea225a1f5396ab (patch) | |
tree | 3f292e3a2a63b031b59d73378ba300a71a3997d5 /pkg/tcpip/link/waitable | |
parent | 1076702371fa02a36b70a6abf10dbec886742208 (diff) |
Add LinkEndpoint.WriteRawPacket with stubs
...returning unsupported errors.
PiperOrigin-RevId: 393388991
Diffstat (limited to 'pkg/tcpip/link/waitable')
-rw-r--r-- | pkg/tcpip/link/waitable/waitable.go | 3 | ||||
-rw-r--r-- | pkg/tcpip/link/waitable/waitable_test.go | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/pkg/tcpip/link/waitable/waitable.go b/pkg/tcpip/link/waitable/waitable.go index a95602aa5..13900205d 100644 --- a/pkg/tcpip/link/waitable/waitable.go +++ b/pkg/tcpip/link/waitable/waitable.go @@ -155,3 +155,6 @@ func (e *Endpoint) ARPHardwareType() header.ARPHardwareType { func (e *Endpoint) AddHeader(local, remote tcpip.LinkAddress, protocol tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer) { e.lower.AddHeader(local, remote, protocol, pkt) } + +// WriteRawPacket implements stack.LinkEndpoint. +func (*Endpoint) WriteRawPacket(*stack.PacketBuffer) tcpip.Error { return &tcpip.ErrNotSupported{} } diff --git a/pkg/tcpip/link/waitable/waitable_test.go b/pkg/tcpip/link/waitable/waitable_test.go index a71400ee9..b0e4237bd 100644 --- a/pkg/tcpip/link/waitable/waitable_test.go +++ b/pkg/tcpip/link/waitable/waitable_test.go @@ -80,6 +80,11 @@ func (e *countedEndpoint) WritePackets(_ stack.RouteInfo, pkts stack.PacketBuffe return pkts.Len(), nil } +// WriteRawPacket implements stack.LinkEndpoint. +func (*countedEndpoint) WriteRawPacket(*stack.PacketBuffer) tcpip.Error { + return &tcpip.ErrNotSupported{} +} + // ARPHardwareType implements stack.LinkEndpoint.ARPHardwareType. func (*countedEndpoint) ARPHardwareType() header.ARPHardwareType { panic("unimplemented") |