Do not assume buffer.View boundaries for packet headers
stack.PacketBuffer.Data is documented to be guaranteed not to contain headers that split across views. However, after a discussion with bhaskerh, this guarantee is not true. As such, we should remove all assumptions about buffer.View boundaries for packet headers.
// Data holds the payload of the packet. For inbound packets, it also
// holds the headers, which are consumed as the packet moves up the
// stack. Headers are guaranteed not to be split across views.
//
// The bytes backing Data are immutable, but Data itself may be trimmed
// or otherwise modified.
Data buffer.VectorisedView
#2313 helps achieve this
Marking this closed. Will track further work around buffer reuse as separate tasks.
There are TODOs still referencing this issue:
- pkg/tcpip/header/parse/parse.go:53: Per RFC 791, IHL needs to be at least 5 in
- pkg/tcpip/header/parse/parse.go:179: Figure out whether to reject this kind of
Search TODO
A friendly reminder that this issue had no activity for 120 days.
This issue has been closed due to lack of activity.
There are TODOs still referencing this issue:
- pkg/tcpip/header/parse/parse.go:52: Per RFC 791, IHL needs to be at least 5 in
- pkg/tcpip/header/parse/parse.go:180: Figure out whether to reject this kind of
Search TODO
A friendly reminder that this issue had no activity for 120 days.