From 3f362b0b9a85ea41a1946fdf299b38daaa81a918 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 27 Sep 2008 21:05:18 +0000 Subject: [PATCH] (MODENDP-126) don't accept crypto in the RTP/AVP git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9687 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_glue.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index 54151fcf1e..34f2e44882 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -2203,6 +2203,13 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t * ptime = atoi(attr->a_value); } else if (!got_crypto && !strcasecmp(attr->a_name, "crypto") && !switch_strlen_zero(attr->a_value)) { int crypto_tag; + + if (m->m_proto != sdp_proto_srtp) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "a=crypto in RTP/AVP\n"); + match = 0; + break; + } + crypto = attr->a_value; crypto_tag = atoi(crypto);