summaryrefslogtreecommitdiff
path: root/res/res_rtp_asterisk.c
diff options
context:
space:
mode:
authorYousf Ateya <y.ateya@starkbits.com>2015-05-10 14:37:54 +0200
committerJoshua Colp <jcolp@digium.com>2015-05-13 04:52:52 -0500
commit16f602f5c2297f2d75360efe27893df00b34285a (patch)
tree5efda27b8389a7caee463849d0ec0189bd28bbdf /res/res_rtp_asterisk.c
parent62422712f7d8916fdbb5e388bf5212a1ca00598a (diff)
res_rtp_asterisk: Correction for the limit which detects that a packet is DTLS.
First byte of DTLS packet shall be in range 20-63, not 20-64. Refer to RFC https://tools.ietf.org/html/rfc5764#section-5.1.2 for correct values. Change-Id: Iae6fa0d72b37c36a27fe40686e0ae6fba3afec31
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r--res/res_rtp_asterisk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index ed7dde01d..b78f6e24e 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -2016,8 +2016,9 @@ static int __rtp_recvfrom(struct ast_rtp_instance *instance, void *buf, size_t s
#ifdef HAVE_OPENSSL_SRTP
dtls_srtp_check_pending(instance, rtp, rtcp);
- /* If this is an SSL packet pass it to OpenSSL for processing */
- if ((*in >= 20) && (*in <= 64)) {
+ /* If this is an SSL packet pass it to OpenSSL for processing. RFC section for first byte value:
+ * https://tools.ietf.org/html/rfc5764#section-5.1.2 */
+ if ((*in >= 20) && (*in <= 63)) {
struct dtls_details *dtls = !rtcp ? &rtp->dtls : &rtp->rtcp->dtls;
int res = 0;