diff options
author | Valentin Vidic <Valentin.Vidic@CARNet.hr> | 2018-02-22 10:11:54 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-02-22 20:37:52 +0000 |
commit | 380381ce72e00db3e845eb6507c55b61739d783a (patch) | |
tree | c730ac53db813e4b42516b9831ee7fbf25dff9c5 | |
parent | 4c8c59ca7d1fd7be949e8dc32697ba67b3541e88 (diff) |
TWAMP: Reassemble only the Server-Greeting message
Recursion fix forces all the messages to reassemble into 64 byte
chunks breaking the dissector for later (smaller) messages.
Change-Id: I4ab8ab4259aac5d5fc5a19ce10c6cab2db5ae3e0
Reviewed-on: https://code.wireshark.org/review/25985
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-twamp.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/epan/dissectors/packet-twamp.c b/epan/dissectors/packet-twamp.c index 5920172a84..79e9e5f1cc 100644 --- a/epan/dissectors/packet-twamp.c +++ b/epan/dissectors/packet-twamp.c @@ -469,7 +469,17 @@ dissect_twamp_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void static guint get_server_greeting_len(packet_info *pinfo _U_, tvbuff_t *tvb _U_, int offset _U_, void *data _U_) { - return TWAMP_CONTROL_SERVER_GREETING_LEN; + conversation_t *conversation; + twamp_control_transaction_t *ct; + + conversation = find_or_create_conversation(pinfo); + ct = (twamp_control_transaction_t *) conversation_get_proto_data(conversation, proto_twamp_control); + + if (ct == NULL) { + return TWAMP_CONTROL_SERVER_GREETING_LEN; + } else { + return tvb_captured_length(tvb); + } } static int |