summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/waitable
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-04 01:39:59 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-04 01:39:59 +0000
commit078753e0fe85dbcc047aaa5607a2bbc209491672 (patch)
tree14790716c79a7318214f1dc9293b6158a47851c3 /pkg/tcpip/link/waitable
parent818a047ab6deabe5a75a5452cdb950cc0e22d722 (diff)
parentfc99a7ebf0c24b6f7b3cfd6351436373ed54548b (diff)
Merge release-20200323.0-69-gfc99a7e (automated)
Diffstat (limited to 'pkg/tcpip/link/waitable')
-rwxr-xr-xpkg/tcpip/link/waitable/waitable.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/link/waitable/waitable.go b/pkg/tcpip/link/waitable/waitable.go
index 52fe397bf..2b3741276 100755
--- a/pkg/tcpip/link/waitable/waitable.go
+++ b/pkg/tcpip/link/waitable/waitable.go
@@ -112,9 +112,9 @@ func (e *Endpoint) WritePacket(r *stack.Route, gso *stack.GSO, protocol tcpip.Ne
// WritePackets implements stack.LinkEndpoint.WritePackets. It is called by
// higher-level protocols to write packets. It only forwards packets to the
// lower endpoint if Wait or WaitWrite haven't been called.
-func (e *Endpoint) WritePackets(r *stack.Route, gso *stack.GSO, pkts []stack.PacketBuffer, protocol tcpip.NetworkProtocolNumber) (int, *tcpip.Error) {
+func (e *Endpoint) WritePackets(r *stack.Route, gso *stack.GSO, pkts stack.PacketBufferList, protocol tcpip.NetworkProtocolNumber) (int, *tcpip.Error) {
if !e.writeGate.Enter() {
- return len(pkts), nil
+ return pkts.Len(), nil
}
n, err := e.lower.WritePackets(r, gso, pkts, protocol)