From: guy Date: Sun, 17 Oct 2004 22:14:47 +0000 (+0000) Subject: From Alejandro Vaquero: in the RTP analysis code, don't analyze packets X-Git-Url: http://git.samba.org/samba.git/?p=obnox%2Fwireshark%2Fwip.git;a=commitdiff_plain;h=73167dabe5ea11150e41a9faa79c563c05e540c9 From Alejandro Vaquero: in the RTP analysis code, don't analyze packets that have an RTP version other than 2. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12332 f5534014-38df-0310-8fa8-9805f1628bb7 --- diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c index 6dd725636e..80ef73577a 100644 --- a/epan/dissectors/packet-rtp.c +++ b/epan/dissectors/packet-rtp.c @@ -351,6 +351,8 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) octet1 = tvb_get_guint8( tvb, offset ); version = RTP_VERSION( octet1 ); + /* fill in the rtp_info structure */ + rtp_info.info_version = version; if (version != 2) { /* * Unknown or unsupported version. diff --git a/epan/dissectors/packet-rtp.h b/epan/dissectors/packet-rtp.h index 42ce2aa2c4..276f35a64c 100644 --- a/epan/dissectors/packet-rtp.h +++ b/epan/dissectors/packet-rtp.h @@ -28,6 +28,7 @@ */ struct _rtp_info { + unsigned int info_version; gboolean info_padding_set; gboolean info_marker_set; unsigned int info_payload_type; diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c index 4744b2c0f0..8ecf150bee 100644 --- a/gtk/rtp_analysis.c +++ b/gtk/rtp_analysis.c @@ -550,6 +550,9 @@ static int rtp_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *e /* we ignore packets that are not displayed */ if (pinfo->fd->flags.passed_dfilter == 0) return 0; + /* also ignore RTP Version != 2 */ + else if (rtpinfo->info_version !=2) + return 0; /* is it the forward direction? */ else if (user_data->ssrc_fwd == rtpinfo->info_sync_src) { #ifdef USE_CONVERSATION_GRAPH @@ -3533,6 +3536,7 @@ void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_) guint32 ip_dst_rev; guint16 port_dst_rev; guint32 ssrc_rev = 0; + unsigned int version_fwd; gchar filter_text[256]; dfilter_t *sfcode; @@ -3593,6 +3597,13 @@ void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_) g_memmove(&ip_dst_rev, edt->pi.src.data, 4); port_src_rev = edt->pi.destport; port_dst_rev = edt->pi.srcport; + + /* check if it is RTP Version 2 */ + if (!get_int_value_from_proto_tree(edt->tree, "rtp", "rtp.version", &version_fwd) || version_fwd != 2) { + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, + "RTP Version != 2 is not supported!"); + return; + } /* now we need the SSRC value of the current frame */ if (!get_int_value_from_proto_tree(edt->tree, "rtp", "rtp.ssrc", &ssrc_fwd)) {