summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-05-14 19:57:47 +0000
committergVisor bot <gvisor-bot@google.com>2021-05-14 19:57:47 +0000
commit69b159307df360bdcda964a468625c25adbd9b5c (patch)
treecf64ba34dd97ec2c823abfa7afe484d09f9388f3 /pkg/tcpip
parent042ac2e7170513c5928b36c95b16544f7130cda4 (diff)
parent2ac6b76884c7a8c8b788b4c376098ea48b9fe610 (diff)
Merge release-20210510.0-35-g2ac6b7688 (automated)
Diffstat (limited to 'pkg/tcpip')
-rw-r--r--pkg/tcpip/stack/packet_buffer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/stack/packet_buffer.go b/pkg/tcpip/stack/packet_buffer.go
index e2e073091..01652fbe7 100644
--- a/pkg/tcpip/stack/packet_buffer.go
+++ b/pkg/tcpip/stack/packet_buffer.go
@@ -261,7 +261,7 @@ func (pk *PacketBuffer) consume(typ headerType, size int) (v tcpipbuffer.View, c
if h.length > 0 {
panic(fmt.Sprintf("consume must not be called twice: type %s", typ))
}
- if pk.headerOffset()+pk.consumed+size > int(pk.buf.Size()) {
+ if pk.reserved+pk.consumed+size > int(pk.buf.Size()) {
return nil, false
}
h.offset = pk.consumed