Bug 2795

Summary: TCP error model can mangle packets
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: tcpAssignee: natale.patriciello
Status: CONFIRMED ---    
Severity: normal CC: ns-bugs
Priority: P3    
Version: unspecified   
Hardware: All   
OS: All   
Attachments: workaround (needs additional work)

Description Tom Henderson 2017-10-05 11:12:08 EDT
I found a few cases in which the TCP error model in the test directory would cause packet drops even if 'ShouldDrop()' returned false; i.e. the act of modifying the packet for evaluation is causing some kind of later problem with the packet (which I didn't debug).

I'm logging this issue (and a patch) to return to it later; the problem can be avoided if the packet is copied before evaluation.

Also, it is difficult to use this error model in the device models (where there typically is an error model pointer) because of other headers and packets such as Ethernet or Arp present (the model presumes an IP and TCP header), so it may be worthwhile to allow this error model to be inserted directly at the TCP layer, and to put some sanity checks so it doesn't try to decode non-TCP packets.  The error model isn't used extensively at the moment.
Comment 1 Tom Henderson 2017-10-05 11:13:34 EDT
Created attachment 2930 [details]
workaround (needs additional work)