From Alejandro Vaquero: in the RTP analysis code, don't analyze packets
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 17 Oct 2004 22:14:47 +0000 (22:14 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 17 Oct 2004 22:14:47 +0000 (22:14 +0000)
that have an RTP version other than 2.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12332 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-rtp.c
epan/dissectors/packet-rtp.h
gtk/rtp_analysis.c

index 6dd725636ea794f4deb1bae62e5c33d0b9150d55..80ef73577a6533b58fb4941c714964c23ae03fdf 100644 (file)
@@ -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.
index 42ce2aa2c439401d70f420d7dac4c1e1307a0db5..276f35a64c7b659cf6b3d730bc6c28d8aa7dd2b6 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 struct _rtp_info {
+       unsigned int  info_version;
        gboolean      info_padding_set;
        gboolean      info_marker_set;
        unsigned int  info_payload_type;
index 4744b2c0f091089b55c797ce618788ca928233b7..8ecf150bee300a0cc53d12559c522718154e27c5 100644 (file)
@@ -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)) {