[sr-dev] git:master:13d786e3: rtpengine: fixing wrong parsing the pair of IPv6 addr:port (#2592)
GitHub
noreply at github.com
Mon Jan 4 16:35:48 CET 2021
Module: kamailio
Branch: master
Commit: 13d786e33d6f04a718af40ba345cf0827f752c2f
URL: https://github.com/kamailio/kamailio/commit/13d786e33d6f04a718af40ba345cf0827f752c2f
Author: Dennis <dennis_y at mail.ru>
Committer: GitHub <noreply at 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/13d786e33d6f04a718af40ba345cf0827f752c2f.diff
Patch: https://github.com/kamailio/kamailio/commit/13d786e33d6f04a718af40ba345cf0827f752c2f.patch
---
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++;
}
More information about the sr-dev
mailing list