Module: kamailio
Branch: master
Commit: 13d786e33d6f04a718af40ba345cf0827f752c2f
URL:
https://github.com/kamailio/kamailio/commit/13d786e33d6f04a718af40ba345cf08…
Author: Dennis <dennis_y(a)mail.ru>
Committer: GitHub <noreply(a)github.com>
Date: 2021-01-04T10:35:44-05:00
rtpengine: fixing wrong parsing the pair of IPv6 addr:port (#2592)
- fixing wrong parsing the pair of IPv6 addr:port in rtpengine module, when loading node
information from database.
---
Modified: src/modules/rtpengine/rtpengine.c
---
Diff:
https://github.com/kamailio/kamailio/commit/13d786e33d6f04a718af40ba345cf08…
Patch:
https://github.com/kamailio/kamailio/commit/13d786e33d6f04a718af40ba345cf08…
---
diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index fb736b2f10..7eb0843793 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -1022,7 +1022,14 @@ int add_rtpengine_socks(struct rtpp_set *rtpp_list, char
*rtpengine,
/* Check the rn_address is 'hostname:port' */
/* Check the rn_address port is valid */
- p1 = strchr(pnode->rn_address, ':');
+ if(pnode->rn_umode == 6) {
+ p1 = strstr(pnode->rn_address, "]:");
+ if(p1 != NULL) {
+ p1++;
+ }
+ } else {
+ p1 = strchr(pnode->rn_address, ':');
+ }
if (p1 != NULL) {
p1++;
}