diff options
author | Toshi Kikuchi <toshik@google.com> | 2020-11-16 13:05:01 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-16 13:06:38 -0800 |
commit | 758e45618f3d663a092b31baf29f24b3e4dc4d54 (patch) | |
tree | a5096027088f04b0323f35624376a3922b666908 /pkg/tcpip/header/parse/parse.go | |
parent | a73877ac944cf3f6b7763c62a5c4a9a4a32455d5 (diff) |
Clean up fragmentation.Process
- Pass a PacketBuffer directly instead of releaseCB
- No longer pass a VectorisedView, which is included in the PacketBuffer
- Make it an error if data size is not equal to (last - first + 1)
- Set the callback for the reassembly timeout on NewFragmentation
PiperOrigin-RevId: 342702432
Diffstat (limited to 'pkg/tcpip/header/parse/parse.go')
-rw-r--r-- | pkg/tcpip/header/parse/parse.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/tcpip/header/parse/parse.go b/pkg/tcpip/header/parse/parse.go index 5ca75c834..2042f214a 100644 --- a/pkg/tcpip/header/parse/parse.go +++ b/pkg/tcpip/header/parse/parse.go @@ -109,6 +109,9 @@ traverseExtensions: fragOffset = extHdr.FragmentOffset() fragMore = extHdr.More() } + rawPayload := it.AsRawHeader(true /* consume */) + extensionsSize = dataClone.Size() - rawPayload.Buf.Size() + break traverseExtensions case header.IPv6RawPayloadHeader: // We've found the payload after any extensions. |