summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/fdbased/endpoint.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tcpip/link/fdbased/endpoint.go')
-rw-r--r--pkg/tcpip/link/fdbased/endpoint.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/link/fdbased/endpoint.go b/pkg/tcpip/link/fdbased/endpoint.go
index 0b0d6c1e2..40a10eb9b 100644
--- a/pkg/tcpip/link/fdbased/endpoint.go
+++ b/pkg/tcpip/link/fdbased/endpoint.go
@@ -178,10 +178,10 @@ func (e *endpoint) WritePacket(r *stack.Route, hdr buffer.Prependable, payload b
}
if payload.Size() == 0 {
- return rawfile.NonBlockingWrite(e.fd, hdr.UsedBytes())
+ return rawfile.NonBlockingWrite(e.fd, hdr.View())
}
- return rawfile.NonBlockingWrite2(e.fd, hdr.UsedBytes(), payload.ToView())
+ return rawfile.NonBlockingWrite2(e.fd, hdr.View(), payload.ToView())
}
func (e *endpoint) capViews(n int, buffers []int) int {