Wireshark-commits: [Wireshark-commits] master-2.6 2f3b56c: tcp: fix Follow TCP Stream for overlappi
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=2f3b56c21e0fa0f2fecbc6641e537b5ef68eae91
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master-2.6
Repository: wireshark
Commits:
2f3b56c by Peter Wu (peter@xxxxxxxxxxxxx):
tcp: fix Follow TCP Stream for overlapping data
When two segments overlap each other, previously the second segment
would wrongly be appended to the first one while it should only append a
subset from the end of the second segment. (It is assumed that the very
first segment is received in time such that an extension on both the
left and right side of the previous stream is not possible.)
Make sure that "frag_follow_record->data" uses a subset (starting at the
end of the previous stream) instead of the full tvb contents. While at
it, add some documentation and restructure the logic to avoid code
duplication and unnecessary memory allocations.
(From bug 9882:) Tested with hao123-com_packet-injection-filtered.pcap,
it now ignores the new overlapping data. Likewise for overlap-2.pcap.
Tested with retransmission_with_additional_payload.pcapng (bug 13700).
Unfortunately, there is no extra expert info to warn about the
non-matching overlapping segment data, but that is a separate issue.
Bug: 13700
Change-Id: I74a941199d75b23b5d297e4dd534680ae610627d
Reviewed-on: https://code.wireshark.org/review/28597
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
(cherry picked from commit aecb143e2c704d0b59b15420f60f780927fe7438)
Reviewed-on: https://code.wireshark.org/review/28645
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Actions performed:
from 6fc9501 tcp: fix Follow TCP Stream with missing (but ACKed) segments
adds 2f3b56c tcp: fix Follow TCP Stream for overlapping data
Summary of changes:
epan/dissectors/packet-tcp.c | 117 ++++++++++++++++++++++---------------------
1 file changed, 61 insertions(+), 56 deletions(-)