diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c index bf76ea4fd41..7abc51d9a3c 100644 --- a/modules/nathelper/nathelper.c +++ b/modules/nathelper/nathelper.c @@ -978,7 +978,11 @@ 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)) + /* Conditions: + - same IP protocol format for received IP and new IP + - null IP received + */ + if (oldpf == newpf && isnulladdr(oldip, oldpf)) return 0; if (newip->len == oldip->len && memcmp(newip->s, oldip->s, newip->len) == 0)