From b8b17bfa6b9db82e77a97d33fb9a84fdd4c6919f Mon Sep 17 00:00:00 2001 From: Eric Tamme Date: Mon, 12 Jan 2015 08:30:49 -0700 Subject: [PATCH] clear crypto for BOTH legs when in passthrough mode --- daemon/call.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index 307b9bfe9..70c950172 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1916,10 +1916,17 @@ static void __generate_crypto(const struct sdp_ng_flags *flags, struct call_medi if (!this->protocol || !this->protocol->srtp || MEDIA_ISSET(this, PASSTHRU)) { cp->crypto_suite = NULL; + /* clear crypto for the this leg b/c we are in passthrough mode */ MEDIA_CLEAR(this, DTLS); MEDIA_CLEAR(this, SDES); MEDIA_CLEAR(this, SETUP_PASSIVE); MEDIA_CLEAR(this, SETUP_ACTIVE); + /* clear crypto for the other leg as well b/c passthrough only works if it is done for both legs */ + MEDIA_CLEAR(other, DTLS); + MEDIA_CLEAR(other, SDES); + MEDIA_CLEAR(other, SETUP_PASSIVE); + MEDIA_CLEAR(other, SETUP_ACTIVE); + return; }