From 9e54fcee5224aef800155514cac5e40d9e38a23e Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Wed, 28 Oct 2015 22:32:17 +0100 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin --- epan/dissectors/packet-stun.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'epan/dissectors/packet-stun.c') 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; } -- cgit v1.2.3