]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
(MODENDP-126) don't accept crypto in the RTP/AVP
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 27 Sep 2008 21:05:18 +0000 (21:05 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 27 Sep 2008 21:05:18 +0000 (21:05 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9687 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index 54151fcf1ede564fcad1ef738f680ec1455375a5..34f2e44882a80b7965e176f901c5697018b9135f 100644 (file)
@@ -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);