URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=3e9e05cf0ad02d1c03d80071b782dc23010f10dd
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
3e9e05c by Peter Wu (peter@xxxxxxxxxxxxx):
TCP: fix DESEGMENT_UNTIL_FIN handling in combination with OoO tracking
For dissectors that expect reassembly at FIN (for example, the WHOIS
dissector), the expected end of the reassembly is not known until the
FIN packet is received. We cannot rely on 'nxtseq' being valid, and
certainly not use it to set the end of the reassembly using
fragment_reset_tot_len.
Since (1) OoO segments before FIN are already properly handled without
extra care, and (2) OoO FIN is already broken, just disable OoO handling
when DESEGMENT_UNTIL_FIN is requested. This ensures that reassembly at
FIN is not skipped due to lack of data.
Explicitly calculate 'nxtpdu' for the FIN case. Previously it happened
to work because streams were often smaller than DESEGMENT_UNTIL_FIN
(0x0ffffffe, 256MiB), but that was not obvious.
Bug: 16289
Change-Id: I9b9468925d49765e21e58136c8a2366da082eeba
Fixes: v2.9.0rc0-1097-gca42331437 ("tcp: add support for reassembling out-of-order segments")
Reviewed-on: https://code.wireshark.org/review/35543
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from 0db02a8 GSUP/SMS: also dissect ToN/NPI header in SM-RP-DA/OA
add 3e9e05c TCP: fix DESEGMENT_UNTIL_FIN handling in combination with OoO tracking
Summary of changes:
epan/dissectors/packet-tcp.c | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)