Module: kamailio
Branch: master
Commit: 5f901c3557f9f875545d82a7ab00f6d0c5c1fe52
URL:
https://github.com/kamailio/kamailio/commit/5f901c3557f9f875545d82a7ab00f6d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-03-22T10:25:48+01:00
core: socket info - parse advertise ip part to get address family
---
Modified: src/core/socket_info.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5f901c3557f9f875545d82a7ab00f6d…
Patch:
https://github.com/kamailio/kamailio/commit/5f901c3557f9f875545d82a7ab00f6d…
---
diff --git a/src/core/socket_info.c b/src/core/socket_info.c
index e048e0e2c4b..ab59df73dd6 100644
--- a/src/core/socket_info.c
+++ b/src/core/socket_info.c
@@ -338,6 +338,11 @@ static inline struct socket_info *new_sock_info(char *name,
p = si->useinfo.name.s + 1;
si->useinfo.af = AF_INET6;
} else {
+ ip_addr_t *ipv = NULL;
+ ipv = str2ipx(&si->useinfo.name);
+ if(ipv != NULL) {
+ si->useinfo.af = ipv->af;
+ }
si->useinfo.address_str.len = si->useinfo.name.len;
p = si->useinfo.name.s;
}