summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/channel/channel.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-11-22 22:59:06 +0000
committergVisor bot <gvisor-bot@google.com>2019-11-22 22:59:06 +0000
commitbe617b8a62b735bf97e0948527622d221b9642dd (patch)
tree1a669845fa2663c7f57df0067d5d3396620b8ac6 /pkg/tcpip/link/channel/channel.go
parent70f9648aacbb789775e189e3c058c325141be3c4 (diff)
parent9db08c4e583e758e3eb1aed03875743ce02b8cff (diff)
Merge release-20191114.0-22-g9db08c4 (automated)
Diffstat (limited to 'pkg/tcpip/link/channel/channel.go')
-rwxr-xr-xpkg/tcpip/link/channel/channel.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/tcpip/link/channel/channel.go b/pkg/tcpip/link/channel/channel.go
index 9fe8e9f9d..70188551f 100755
--- a/pkg/tcpip/link/channel/channel.go
+++ b/pkg/tcpip/link/channel/channel.go
@@ -133,16 +133,16 @@ func (e *Endpoint) WritePacket(_ *stack.Route, gso *stack.GSO, protocol tcpip.Ne
}
// WritePackets stores outbound packets into the channel.
-func (e *Endpoint) WritePackets(_ *stack.Route, gso *stack.GSO, hdrs []stack.PacketDescriptor, payload buffer.VectorisedView, protocol tcpip.NetworkProtocolNumber) (int, *tcpip.Error) {
- payloadView := payload.ToView()
+func (e *Endpoint) WritePackets(_ *stack.Route, gso *stack.GSO, pkts []tcpip.PacketBuffer, protocol tcpip.NetworkProtocolNumber) (int, *tcpip.Error) {
+ payloadView := pkts[0].Data.ToView()
n := 0
packetLoop:
- for _, hdr := range hdrs {
- off := hdr.Off
- size := hdr.Size
+ for _, pkt := range pkts {
+ off := pkt.DataOffset
+ size := pkt.DataSize
p := PacketInfo{
Pkt: tcpip.PacketBuffer{
- Header: hdr.Hdr,
+ Header: pkt.Header,
Data: buffer.NewViewFromBytes(payloadView[off : off+size]).ToVectorisedView(),
},
Proto: protocol,