diff options
author | Peter Wu <peter@lekensteyn.nl> | 2019-12-22 00:25:36 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2020-01-09 07:58:03 +0000 |
commit | 3e9e05cf0ad02d1c03d80071b782dc23010f10dd (patch) | |
tree | 78e421580109b005a34983ace4b833826f9087d3 /epan/funnel.h | |
parent | 0db02a89f3cb0bca3a8c6a796e7bd8822e4b3c3f (diff) |
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@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/funnel.h')
0 files changed, 0 insertions, 0 deletions