Blob Blame Raw
From: Ovidiu Sas <osas@voipembedded.com>
Date: Mon, 5 Feb 2018 10:00:14 -0500
Subject: [PATCH] rtpproxy: fix test condition for altering IP in SDP while
 forcing RTP

(cherry picked from commit 55e9479b32c2d01a12a3278afb75b0fa520605c4)

diff --git a/modules/rtpproxy/rtpproxy.c b/modules/rtpproxy/rtpproxy.c
index f00e796da..c68ba7251 100644
--- a/modules/rtpproxy/rtpproxy.c
+++ b/modules/rtpproxy/rtpproxy.c
@@ -1898,7 +1898,7 @@ alter_mediaip(struct sip_msg *msg, str *body, str *oldip, int oldpf,
 	str omip, nip, oip;
 
 	/* check that updating media-ip is really necessary */
-	if (oldpf == newpf && isnulladdr(oldip, oldpf))
+	if (oldpf == newpf || isnulladdr(oldip, oldpf))
 		return 0;
 	if (newip->len == oldip->len &&
 	    memcmp(newip->s, oldip->s, newip->len) == 0)