aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtp.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2008-04-23 06:51:15 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2008-04-23 06:51:15 +0000
commit36471e1f8c95c260f7cc020d418ece62344b6502 (patch)
treef54273211cc5655fe6d4eb65e110451445c0e599 /epan/dissectors/packet-rtp.c
parent1638e46df2abde295c84a33286d9cab84fa2ea4c (diff)
From Peter Fuller:
If a UDP packet is submitted to the RTP heuristic dissector with either odd src or dst ports, the heuristic will correctly return FALSE. However, that interferes with the next few lines of code that can potentially treat version 0 RTP packets as either STUN or T38 depending on preference settings. svn path=/trunk/; revision=25150
Diffstat (limited to 'epan/dissectors/packet-rtp.c')
-rw-r--r--epan/dissectors/packet-rtp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c
index e0ca8f24bd..984f8b2580 100644
--- a/epan/dissectors/packet-rtp.c
+++ b/epan/dissectors/packet-rtp.c
@@ -478,11 +478,6 @@ dissect_rtp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
if (! global_rtp_heur)
return FALSE;
- /* Was it sent between 2 even-numbered ports? */
- if ((pinfo->srcport % 2) || (pinfo->destport % 2)) {
- return FALSE;
- }
-
/* Get the fields in the first octet */
octet1 = tvb_get_guint8( tvb, offset );
version = RTP_VERSION( octet1 );
@@ -507,6 +502,11 @@ dissect_rtp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
return FALSE;
}
+ /* Was it sent between 2 even-numbered ports? */
+ if ((pinfo->srcport % 2) || (pinfo->destport % 2)) {
+ return FALSE;
+ }
+
/* Get the fields in the second octet */
octet2 = tvb_get_guint8( tvb, offset + 1 );
payload_type = RTP_PAYLOAD_TYPE( octet2 );