diff options
author | John Thacker <johnthacker@gmail.com> | 2022-08-27 15:12:34 -0400 |
---|---|---|
committer | A Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2022-08-30 21:44:11 +0000 |
commit | f3df91b90d2cd1f71b266b4be53f754df9828a5c (patch) | |
tree | 258d668f3759f34bc2de4a43131c4a087c617fb9 /test | |
parent | bed5b0e02521e93f94b7ddf475ae9067b934dc71 (diff) |
tcp: Fix handling of retransmission for reassembly
When reassemble_ooo is set, we can do a better job determining
if a segment is retransmitted or not from the reassembler perspective,
which is different than what TCP sequence analysis determines, which
is retransmission from the sender's perspective.
This also allows us to have a good way of dealing with retransmission
but with additional data.
This only works when reassembling out of order is set. Without it,
we fall back to the old method of detecting retransmissions, which
has a harder time with the edge cases.
Fix #17406, fix #15993, fix #13388, fix #13523.
Diffstat (limited to 'test')
-rw-r--r-- | test/suite_dissection.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/suite_dissection.py b/test/suite_dissection.py index 205ee70d67..5ef2defead 100644 --- a/test/suite_dissection.py +++ b/test/suite_dissection.py @@ -621,15 +621,17 @@ class case_dissect_tcp(subprocesstest.SubprocessTestCase): # H - first time that the start of the MSP is delivered self.assertIn('3\t6\t[TCP Out-Of-Order]', lines[2]) self.assertIn('[TCP segment of a reassembled PDU]', lines[2]) - # H - first retransmission. - self.assertIn('4\t\t', lines[3]) - self.assertNotIn('[TCP segment of a reassembled PDU]', lines[3]) + # H - first retransmission. Because this is before the reassembly + # completes we can add it to the reassembly + self.assertIn('4\t6\t[TCP Out-Of-Order]', lines[3]) + self.assertIn('[TCP segment of a reassembled PDU]', lines[3]) # 1 - continue reassembly self.assertIn('5\t6\t[TCP Out-Of-Order]', lines[4]) self.assertIn('[TCP segment of a reassembled PDU]', lines[4]) # 3 - finish reassembly self.assertIn('6\t\tPUT /0 HTTP/1.1', lines[5]) - # H - second retransmission. + # H - second retransmission. This is after the reassembly completes + # so we do not add it to the ressembly (but throw a ReassemblyError.) self.assertIn('7\t\t', lines[6]) self.assertNotIn('[TCP segment of a reassembled PDU]', lines[6]) |