Packets with TSO: address review feedback.

This addresses review feedback of GH-1831 and additionally fixes one
case in which PayloadLen was used in a way that would have given
problematic results when TSO is enabled.
This commit is contained in:
Johanna Amann 2021-11-09 15:11:27 +00:00
parent e14b695497
commit a011b4cb70
2 changed files with 10 additions and 1 deletions

View file

@ -411,6 +411,9 @@ public:
/**
* Returns the length of the IP packet's payload (length of packet minus
* header length or, for IPv6, also minus length of all extension headers).
*
* Also returns 0 if the IPv4 length field is set to zero - which is, e.g.,
* the case when TCP segment offloading is enabled.
*/
uint16_t PayloadLen() const
{