projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
46ffd20
)
Ignore invalid RTP packets (bug #3030)
author
Mark Spencer
<markster@digium.com>
Tue, 28 Dec 2004 16:45:03 +0000
(16:45 +0000)
committer
Mark Spencer
<markster@digium.com>
Tue, 28 Dec 2004 16:45:03 +0000
(16:45 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4570
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
rtp.c
patch
|
blob
|
history
diff --git
a/rtp.c
b/rtp.c
index
e97b869
..
acf67d0
100755
(executable)
--- a/
rtp.c
+++ b/
rtp.c
@@
-427,6
+427,7
@@
struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
struct sockaddr_in sin;
int len;
unsigned int seqno;
+ int version;
int payloadtype;
int hdrlen = 12;
int mark;
@@
-477,6
+478,12
@@
struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
/* Get fields */
seqno = ntohl(rtpheader[0]);
+
+ /* Check RTP version */
+ version = (seqno & 0xC0000000) >> 30;
+ if (version != 2)
+ return &null_frame;
+
payloadtype = (seqno & 0x7f0000) >> 16;
mark = seqno & (1 << 23);
ext = seqno & (1 << 28);