aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-stun.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-10-28 22:32:17 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2015-10-30 18:08:06 +0000
commit9e54fcee5224aef800155514cac5e40d9e38a23e (patch)
tree15c31219710aa882d6d4a1b5404f46ea31e22cb6 /epan/dissectors/packet-stun.c
parentd6dd50b1e33de97ed540efdf984ac1564b9c84ef (diff)
STUN: register a new conversation dissector after receiving a ConnectionBind Success Response message
According to RFC 6062, once the connection is established, data is sent as-is To stop the STUN dissector from interfering, add the ability to specify a starting frame for a conversation dissector and use it Bug: 11641 Change-Id: I65ca96bddacf70444009c0642ea22173fa68992e Reviewed-on: https://code.wireshark.org/review/11372 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 'epan/dissectors/packet-stun.c')
-rw-r--r--epan/dissectors/packet-stun.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/dissectors/packet-stun.c b/epan/dissectors/packet-stun.c
index 13885a9167..c7affc408e 100644
--- a/epan/dissectors/packet-stun.c
+++ b/epan/dissectors/packet-stun.c
@@ -1343,6 +1343,13 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
}
}
+ if (!PINFO_FD_VISITED(pinfo) && is_turn && (pinfo->ptype == PT_TCP)
+ && (msg_type_method == CONNECTION_BIND) && (msg_type_class == RESPONSE)) {
+ /* RFC 6062: after the ConnectionBind exchange, the connection is no longer framed as TURN;
+ instead, it is an unframed pass-through.
+ Starting from next frame set conversation dissector to data */
+ conversation_set_dissector_from_frame_number(conversation, pinfo->fd->num+1, data_handle);
+ }
return reported_length;
}