Commit a5b010b6ea for asterisk.org
commit a5b010b6ea62a281a8033d30483c607570440a5c
Author: Mehrdad Seifzadeh <mehrdad.seifzadeh@gmail.com>
Date: Sun Sep 6 08:45:56 2026 -0400
res_resolver_unbound: Include libunbound error reason
Failures returned by ub_resolve_async() are currently logged without the
reason provided by libunbound, making resolver configuration failures
difficult to diagnose.
Include ub_strerror() in the error message so the underlying libunbound
failure reason is available in the Asterisk log.
Resolves: #2110
diff --git a/res/res_resolver_unbound.c b/res/res_resolver_unbound.c
index ced578069f..03d380f933 100644
--- a/res/res_resolver_unbound.c
+++ b/res/res_resolver_unbound.c
@@ -329,8 +329,8 @@ static int unbound_resolver_resolve(struct ast_dns_query *query)
ao2_bump(query), unbound_resolver_callback, &data->id);
if (res) {
- ast_log(LOG_ERROR, "Failed to perform async DNS resolution of '%s'\n",
- ast_dns_query_get_name(query));
+ ast_log(LOG_ERROR, "Failed to perform async DNS resolution of '%s': %s\n",
+ ast_dns_query_get_name(query), ub_strerror(res));
ao2_ref(query, -1);
}