From 29b8abfb9bce3c032e0f3f86dfbfdb7f0bf9c2bd Mon Sep 17 00:00:00 2001 From: Mehrdad Seifzadeh Date: Sun, 6 Sep 2026 08:45:56 -0400 Subject: [PATCH] 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 --- res/res_resolver_unbound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }