Make sure ai_canonname is set when AI_CANONNAME was requested.
authorflorian <florian@openbsd.org>
Wed, 21 Aug 2024 05:53:10 +0000 (05:53 +0000)
committerflorian <florian@openbsd.org>
Wed, 21 Aug 2024 05:53:10 +0000 (05:53 +0000)
commitd1f9129b3751a332ed93634d090cd47f59f5974a
treecf02f092ebff5e7fce90127c76e0f0626260fef2
parentf57da120da8e59b51a1cbd017a21de40413d0c0f
Make sure ai_canonname is set when AI_CANONNAME was requested.

We document, and posix requires, to return a NUL-terminated string on
a successful  call to getaddrinfo(3) when AI_CANONNAME was set.

If the canonical name cannot be determined, return the node name as
suggested by posix.

OK guenther
lib/libc/asr/getaddrinfo_async.c