summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-11-11 15:17:54 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-11-11 15:17:55 -0600
commit10e64a5fb815be6e83f8fc707bbaaa3233498c5d (patch)
treed69fa64000532c53347af7f738b2df923624453e
parentcf08676c00ad7450a00a1341b0738f628c402342 (diff)
parentb70eb07c53d041e868ced079759471220f78bf50 (diff)
Merge "res_pjsip_sdp_rtp: Reject offer of required SRTP without res_srtp." into 13
-rw-r--r--res/res_pjsip_sdp_rtp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 6a8b43d72..66550a2fd 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -896,9 +896,11 @@ static int negotiate_incoming_sdp_stream(struct ast_sip_session *session, struct
res = setup_media_encryption(session, session_media, sdp, stream);
if (res) {
- if (!session->endpoint->media.rtp.encryption_optimistic) {
+ if (!session->endpoint->media.rtp.encryption_optimistic ||
+ !pj_strncmp2(&stream->desc.transport, "RTP/SAVP", 8)) {
/* If optimistic encryption is disabled and crypto should have been enabled
- * but was not this session must fail.
+ * but was not this session must fail. This must also fail if crypto was
+ * required in the offer but could not be set up.
*/
return -1;
}