Bugzilla – Bug 2795
TCP error model can mangle packets
Last modified: 2017-10-05 11:13:34 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.
Created attachment 2930 [details]
workaround (needs additional work)