aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-10-17 22:14:47 +0000
committerGuy Harris <guy@alum.mit.edu>2004-10-17 22:14:47 +0000
commitee26f8b9bb21b9213ea0ce21c9180039895aa5e4 (patch)
treec89c23eec8e7b319d6918d5a1aa137a09cca2857
parent8df4148db62fd76e84badc08d0d3c3b0d26e184c (diff)
From Alejandro Vaquero: in the RTP analysis code, don't analyze packets
that have an RTP version other than 2. svn path=/trunk/; revision=12332
-rw-r--r--epan/dissectors/packet-rtp.c2
-rw-r--r--epan/dissectors/packet-rtp.h1
-rw-r--r--gtk/rtp_analysis.c11
3 files changed, 14 insertions, 0 deletions
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)) {