From: Ovidiu Sas <osas@voipembedded.com>
Date: Mon, 5 Feb 2018 13:03:09 -0500
Subject: [PATCH] nathelper: manual backport for
3c39167e333a8801772f49f8561a015bfa1836f1 - fix test condition for updateing
IP for fix_nated_sdp()
diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c
index 41f12968b..bf76ea4fd 100644
--- a/modules/nathelper/nathelper.c
+++ b/modules/nathelper/nathelper.c
@@ -978,7 +978,7 @@ alter_mediaip(struct sip_msg *msg, str *body, str *oldip, int oldpf,
str omip, nip, oip;
/* check that updating mediaip 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)