From 43cd3f520aff2d5d85566453a1f7a76c99430ded Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 20 Jan 2015 08:50:17 -0500 Subject: [PATCH] reset other side's crypto params only in passthru mode fixes #63 --- daemon/call.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 70c950172..79e39e769 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1921,11 +1921,15 @@ static void __generate_crypto(const struct sdp_ng_flags *flags, struct call_medi 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); + + if (MEDIA_ISSET(this, PASSTHRU)) { + /* 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; }