summaryrefslogtreecommitdiff
path: root/epan/packet.h
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2014-01-29 18:04:20 -0500
committerEvan Huus <eapache@gmail.com>2014-01-30 22:11:41 +0000
commit21e0a63b295a159b5876018eb03d714a4600a8eb (patch)
tree7b0e20bbae04b5d581de5620adcc6beeebf85aff /epan/packet.h
parent458b83568399b8bc620a01e8b92dc5cffe7b763e (diff)
downloadwireshark-21e0a63b295a159b5876018eb03d714a4600a8eb.tar.gz
Add remove_last_data_source and fix bug 9169
The OP asked 9169 to be reopened because the capture was spewing ~40GB of output when dissected with tshark. Investigation showed this was because the HTTP dissector was requesting ONE_MORE_PACKET reassembly a lot, and TCP was adding each step as a data-source which was being printed by tshark's hex dump. This was leading to O(n^2) of output. To fix, introduce function remove_last_data_source which removes the most recent data source from the list. If the subdissector in TCP reassembly asks for ONE_MORE_PACKET, assume it hasn't added any tree items (since it shouldn't have) and remove the data source since it is unnecessary. This may break dissectors which add tree items and *then* return ONE_MORE_PACKET, since they will have their data source removed out from under them. I believe those cases should be fixed to not add tree items until they're sure they have enough data. Change-Id: Iff07f959b8b8bd1acda9bff03f7c8684901ba8aa Reviewed-on: https://code.wireshark.org/review/38 Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/packet.h')
-rw-r--r--epan/packet.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/packet.h b/epan/packet.h
index af178b81e1..47d0acc0f0 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -512,6 +512,8 @@ final_registration_all_protocols(void);
*/
WS_DLL_PUBLIC void add_new_data_source(packet_info *pinfo, tvbuff_t *tvb,
const char *name);
+/* Removes the last-added data source, if it turns out it wasn't needed */
+WS_DLL_PUBLIC void remove_last_data_source(packet_info *pinfo);
/*