[sr-dev] git:5.5:8bc4b122: nathelper: don't fail if 'a=rtcp' has no IP

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 15 10:00:41 CEST 2021


Module: kamailio
Branch: 5.5
Commit: 8bc4b12270e932febcc77fab65546f534001cc30
URL: https://github.com/kamailio/kamailio/commit/8bc4b12270e932febcc77fab65546f534001cc30

Author: Victor Seva <vseva at sipwise.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-06-15T10:00:00+02:00

nathelper: don't fail if 'a=rtcp' has no IP

Examples from RFC3605:
>    m=audio 49170 RTP/AVP 0
>    a=rtcp:53020
>
>    m=audio 49170 RTP/AVP 0
>    a=rtcp:53020 IN IP4 126.16.64.4
>
>    m=audio 49170 RTP/AVP 0
>    a=rtcp:53020 IN IP6 2001:2345:6789:ABCD:EF01:2345:6789:ABCD

fix #2768

(cherry picked from commit 71441c08970c307e2ce17b2dd292630ea615079c)

---

Modified: src/modules/nathelper/nathelper.c

---

Diff:  https://github.com/kamailio/kamailio/commit/8bc4b12270e932febcc77fab65546f534001cc30.diff
Patch: https://github.com/kamailio/kamailio/commit/8bc4b12270e932febcc77fab65546f534001cc30.patch

---

diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c
index baae1dbb6b..9512834d0e 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -1655,7 +1655,7 @@ static inline int replace_sdp_ip(
 		hasreplaced = 1;
 		body1 = body2;
 	}
-	if(!hasreplaced) {
+	if(!hasreplaced && memcmp("a=rtcp", line, 6) != 0) {
 		LM_ERR("can't extract '%s' IP from the SDP\n", line);
 		return -1;
 	}




More information about the sr-dev mailing list