diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-05-18 19:19:47 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-18 19:19:47 +0000 |
commit | bbb8c8a88fb38b7106d1f9051d85247a438bffc7 (patch) | |
tree | 11d68bc4cb82c5c67d8292bbd7e536535a02a7c4 /pkg/tcpip | |
parent | 1631663539819215d351b29216fd0b403cc06d01 (diff) | |
parent | 5d04e0ae3391cfd518e73141f148ddb8e62faf60 (diff) |
Merge release-20210510.0-51-g5d04e0ae3 (automated)
Diffstat (limited to 'pkg/tcpip')
-rw-r--r-- | pkg/tcpip/stack/packet_buffer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/stack/packet_buffer.go b/pkg/tcpip/stack/packet_buffer.go index 01652fbe7..4ca702121 100644 --- a/pkg/tcpip/stack/packet_buffer.go +++ b/pkg/tcpip/stack/packet_buffer.go @@ -245,10 +245,10 @@ func (pk *PacketBuffer) dataOffset() int { func (pk *PacketBuffer) push(typ headerType, size int) tcpipbuffer.View { h := &pk.headers[typ] if h.length > 0 { - panic(fmt.Sprintf("push must not be called twice: type %s", typ)) + panic(fmt.Sprintf("push(%s, %d) called after previous push", typ, size)) } if pk.pushed+size > pk.reserved { - panic("not enough headroom reserved") + panic(fmt.Sprintf("push(%s, %d) overflows; pushed=%d reserved=%d", typ, size, pk.pushed, pk.reserved)) } pk.pushed += size h.offset = -pk.pushed |