Bug 2795 - TCP error model can mangle packets
TCP error model can mangle packets
Product: ns-3
Classification: Unclassified
Component: tcp
All All
: P3 normal
Assigned To: natale.patriciello
Depends on:
  Show dependency treegraph
Reported: 2017-10-05 11:12 EDT by Tom Henderson
Modified: 2017-10-05 11:13 EDT (History)
1 user (show)

See Also:

workaround (needs additional work) (854 bytes, patch)
2017-10-05 11:13 EDT, Tom Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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)