fragroute fix to support fragmentation of IP datagrams that contain IP Total Length a 0 in header #247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fix is to support the fragmentation of IP datagrams generated by wireshark on windows systems that have TCP segmentation offloading to NIC enabled. In such systems, the IP fragmentation is done by NIC and the IP layer just passes the application data buffer to NIC and sets the IP Total Length field in header is set to 0. Since wireshark sniffs packets before they are properly fragmented by NIC, all these IP datagrams will have large payload with IP Total Length header field set to 0.
The fragroute code does fragmentation based on the IP Total Length field value and break the datagram in smaller fragments as specified by user. However, in current case,since IP total length is 0, the fragroute does not fragment the datagram even though the datagram contains huge payload.
Fix : check if the IP Total Lenght field is zero. If so then read the length of datagram from the incoming buffer length.
Tests : tested with wireshark captures containing valid IP Total Length and also with captures containing zero IP Total Length.