diff options
author | Michael Mann <mmann78@netscape.net> | 2016-10-18 20:34:37 -0400 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2016-11-10 20:48:18 +0000 |
commit | 66fa31415ff8d520c71dc66718599e941ed05c29 (patch) | |
tree | 4ecb47b8faabeea22471682e85771410ec6e5d5e /ui/qt | |
parent | b489b7ff7d4ba9f000f29c608515eb43059855ab (diff) |
tcp: Fix Follow TCP tap data and when its tapped.
Use the model from the 2.0 branch and earlier that only "tapped" the
follow data in a single location. This fixes duplicate data for
reassembled data and handles out-of-order packets.
Bug: 12855
Change-Id: I5268f13e3c08e9271acf026b859de693ad794c94
Reviewed-on: https://code.wireshark.org/review/18368
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/follow_stream_dialog.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/ui/qt/follow_stream_dialog.cpp b/ui/qt/follow_stream_dialog.cpp index 5edfc6015e..562845b2bf 100644 --- a/ui/qt/follow_stream_dialog.cpp +++ b/ui/qt/follow_stream_dialog.cpp @@ -389,6 +389,7 @@ void FollowStreamDialog::removeStreamControls() void FollowStreamDialog::resetStream() { GList *cur; + follow_record_t *follow_record; filter_out_filter_.clear(); text_pos_to_packet_.clear(); @@ -396,13 +397,34 @@ void FollowStreamDialog::resetStream() ws_unlink(data_out_filename_.toUtf8().constData()); } for (cur = follow_info_.payload; cur; cur = g_list_next(cur)) { - follow_record_t *follow_record = (follow_record_t *)cur->data; + follow_record = (follow_record_t *)cur->data; if(follow_record->data) { g_byte_array_free(follow_record->data, TRUE); } g_free(follow_record); } g_list_free(follow_info_.payload); + + //Only TCP stream uses fragments + if (follow_type_ == FOLLOW_TCP) { + for (cur = follow_info_.fragments[0]; cur; cur = g_list_next(cur)) { + follow_record = (follow_record_t *)cur->data; + if(follow_record->data) { + g_byte_array_free(follow_record->data, TRUE); + } + g_free(follow_record); + } + follow_info_.fragments[0] = NULL; + for (cur = follow_info_.fragments[1]; cur; cur = g_list_next(cur)) { + follow_record = (follow_record_t *)cur->data; + if(follow_record->data) { + g_byte_array_free(follow_record->data, TRUE); + } + g_free(follow_record); + } + follow_info_.fragments[1] = NULL; + } + follow_info_.payload = NULL; follow_info_.client_port = 0; } |