support IP fragment with 0 length
Brought to you by:
rwojtczu
A lot of network interfaces support TCP Segmentation Offloading (TSO). Often when a capture file is produced on such an interface, the length variable in the IPv4 header is 0 in the capture file produced. The current version of libnids is rejecting such IP fragments for further processing.
The attached patch detects such an IP header and sets the length of the IP fragment to the payload length. This is usually the correct way to "fix" the header and have libnids handle the TCP stream.