diff options
author | AndersBroman <anders.broman@ericsson.com> | 2016-11-15 14:14:51 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-11-15 15:13:43 +0000 |
commit | 062378920a2e5f49c1cc43135f13740073d56b5b (patch) | |
tree | f96f32b8ebc1a79bfb96f043200496b8cb217c91 /epan/dissectors/packet-sip.c | |
parent | a01d9821f48b0c961b575bec8ef0c15cf24f4543 (diff) |
[SIP export-pdu] Don't export SIP messages from the body of another SIP message
Change-Id: I48336eb721ce730e3d09d4343a8d1170cb985214
Reviewed-on: https://code.wireshark.org/review/18829
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-sip.c')
-rw-r--r-- | epan/dissectors/packet-sip.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index 5c605a8dcd..17dd36cf16 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -3088,7 +3088,21 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info col_set_str(pinfo->cinfo, COL_PROTOCOL, "SIP"); if (!pinfo->flags.in_error_pkt && have_tap_listener(exported_pdu_tap)) { - export_sip_pdu(pinfo,tvb); + wmem_list_frame_t *cur; + guint proto_id; + const gchar *proto_name; + void *tmp; + + /* For SIP messages with other sip messages embeded in the body, dont export those individually. + * E.g. if we are called from the mime_multipart dissector don't export the message. + */ + cur = wmem_list_frame_prev(wmem_list_tail(pinfo->layers)); + tmp = wmem_list_frame_data(cur); + proto_id = GPOINTER_TO_UINT(tmp); + proto_name = proto_get_protocol_filter_name(proto_id); + if (strcmp(proto_name, "mime_multipart") != 0) { + export_sip_pdu(pinfo, tvb); + } } DPRINT2(("------------------------------ dissect_sip_common ------------------------------")); |