Module: kamailio
Branch: master
Commit: b50036200c5bc09fd2d412a18585b42d63763b27
URL:
https://github.com/kamailio/kamailio/commit/b50036200c5bc09fd2d412a18585b42…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-01-11T08:21:00+01:00
core: keep listen socket even if advertise address does not resolve
- the core advertise_address parameter works in the same fashion
- previously it was starting by skipping the listen, which resulted in
unexpected runtime list of sockets
---
Modified: src/core/socket_info.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b50036200c5bc09fd2d412a18585b42…
Patch:
https://github.com/kamailio/kamailio/commit/b50036200c5bc09fd2d412a18585b42…
---
diff --git a/src/core/socket_info.c b/src/core/socket_info.c
index 3f67f16981b..e048e0e2c4b 100644
--- a/src/core/socket_info.c
+++ b/src/core/socket_info.c
@@ -361,11 +361,13 @@ static inline struct socket_info *new_sock_info(char *name,
he = resolvehost(si->useinfo.name.s);
if(he == 0) {
- LM_ERR("unable to resolve advertised name %s\n",
+ LM_WARN("unable to resolve advertised name %s\n",
si->useinfo.name.s);
- goto error;
+ si->useinfo.address.len = 0;
+ si->useinfo.address.af = 0;
+ } else {
+ hostent2ip_addr(&si->useinfo.address, he, 0);
}
- hostent2ip_addr(&si->useinfo.address, he, 0);
}
return si;
error: