With LRO/GRO, TCP segments can be large and 16bit type is not enough to fit possible offsets/lengths. This can lead to a type overflow and broken pbuf chains as result. Further, a broken chain breaks accounting of received data what leads to a warning or even a segfault.
Increase type length for pbuf_header() and the trimming code. This fixes pbuf chain. Also increase type length for pbuf_realloc() to avoid similar issues in the future.
What
Fix type overflow.
Why ?
Bugfix.
Change type
What kind of change does this PR introduce?
[x] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Tests
[ ] Other
Check list
[ ] Code follows the style de facto guidelines of this project
[ ] Comments have been inserted in hard to understand places
Description
With LRO/GRO, TCP segments can be large and 16bit type is not enough to fit possible offsets/lengths. This can lead to a type overflow and broken pbuf chains as result. Further, a broken chain breaks accounting of received data what leads to a warning or even a segfault.
Increase type length for pbuf_header() and the trimming code. This fixes pbuf chain. Also increase type length for pbuf_realloc() to avoid similar issues in the future.
What
Fix type overflow.
Why ?
Bugfix.
Change type
What kind of change does this PR introduce?
Check list