Module: kamailio
Branch: 5.8
Commit: be76a51422df3294c533accae1b6a621ee9d3a7d
URL:
https://github.com/kamailio/kamailio/commit/be76a51422df3294c533accae1b6a62…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-06-18T18:56:53+02:00
tls: remove confusing error message when trying to print socket for <default>
server
CRITICAL: <core> [core/ip_addr.c:232]:
ip_addr2sbuf(): unknown address family 0
NOTICE: tls [tls_domain.c:1176]: ksr_tls_fix_domain(): registered server_name callback
handler for socket [:0], server_name='<default>' ...
(cherry picked from commit 87c8290ab934fd27f8baebabaf66d1fb4168ba72)
---
Modified: src/modules/tls/tls_domain.c
---
Diff:
https://github.com/kamailio/kamailio/commit/be76a51422df3294c533accae1b6a62…
Patch:
https://github.com/kamailio/kamailio/commit/be76a51422df3294c533accae1b6a62…
---
diff --git a/src/modules/tls/tls_domain.c b/src/modules/tls/tls_domain.c
index e056a70b504..810a7e9589a 100644
--- a/src/modules/tls/tls_domain.c
+++ b/src/modules/tls/tls_domain.c
@@ -1155,14 +1155,14 @@ static int ksr_tls_fix_domain(tls_domain_t *d, tls_domain_t *def)
d->ctx[i], tls_server_name_cb)) {
LM_ERR("register server_name callback handler for socket "
"[%s:%d], server_name='%s' failed for proc %d\n",
- ip_addr2a(&d->ip), d->port,
+ (d->ip.af > 0) ? ip_addr2a(&d->ip) : "0.0.0.0", d->port,
(d->server_name.s) ? d->server_name.s : "<default>", i);
return -1;
}
if(!SSL_CTX_set_tlsext_servername_arg(d->ctx[i], d)) {
LM_ERR("register server_name callback handler data for socket "
"[%s:%d], server_name='%s' failed for proc %d\n",
- ip_addr2a(&d->ip), d->port,
+ (d->ip.af > 0) ? ip_addr2a(&d->ip) : "0.0.0.0", d->port,
(d->server_name.s) ? d->server_name.s : "<default>", i);
return -1;
}
@@ -1175,7 +1175,7 @@ static int ksr_tls_fix_domain(tls_domain_t *d, tls_domain_t *def)
&& (d->server_name.len > 0 || (d->type & TLS_DOMAIN_DEF))) {
LM_NOTICE("registered server_name callback handler for socket "
"[%s:%d], server_name='%s' ...\n",
- ip_addr2a(&d->ip), d->port,
+ (d->ip.af > 0) ? ip_addr2a(&d->ip) : "0.0.0.0", d->port,
(d->server_name.s) ? d->server_name.s : "<default>");
}
#endif