[sr-dev] git:master:71441c08: nathelper: don't fail if 'a=rtcp' has no IP
Daniel-Constantin Mierla
miconda at gmail.com
Tue Jun 15 09:51:12 CEST 2021
Module: kamailio
Branch: master
Commit: 71441c08970c307e2ce17b2dd292630ea615079c
URL: https://github.com/kamailio/kamailio/commit/71441c08970c307e2ce17b2dd292630ea615079c
Author: Victor Seva <vseva at sipwise.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-06-15T09:51:07+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
---
Modified: src/modules/nathelper/nathelper.c
---
Diff: https://github.com/kamailio/kamailio/commit/71441c08970c307e2ce17b2dd292630ea615079c.diff
Patch: https://github.com/kamailio/kamailio/commit/71441c08970c307e2ce17b2dd292630ea615079c.patch
---
diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c
index c3036d35bd..5fb83cea46 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -1696,7 +1696,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