On 2024-01-15 09:03 -07, Todd C. Miller <[email protected]> wrote:
> This looks like fallout from the changes in localhost handling in
> the resolver. It seems strange for getaddrinfo() to return success
> but not set res->ai_canonname when AI_CANONNAME is specified.
>
> - todd
>
oops, this seems to be better.
OK?
diff --git getaddrinfo_async.c getaddrinfo_async.c
index a1282e711cd..6d940b0d64e 100644
--- getaddrinfo_async.c
+++ getaddrinfo_async.c
@@ -258,7 +258,8 @@ getaddrinfo_async_run(struct asr_query *as, struct
asr_result *ar)
!is_localhost) ? "::" : "::1";
/* This can't fail */
_asr_sockaddr_from_str(&sa.sa, family, str);
- if ((r = addrinfo_add(as, &sa.sa, NULL))) {
+ if ((r = addrinfo_add(as, &sa.sa,
+ "localhost"))) {
ar->ar_gai_errno = r;
break;
}
--
In my defence, I have been left unsupervised.