HomeFreeBSD

libc/getaddrinfo(2): return EAI_AGAIN on nameserver timeout

Description

libc/getaddrinfo(2): return EAI_AGAIN on nameserver timeout

A nameserver timeout is a soft failure, future attempts may succeed.
Returning EAI_AGAIN is crucial for API users to tell a soft name
resolution failure from negative resolution result.

Before the change we would return EAI_ADDRFAMILY, which I believe, is a
regression from 144361386696, and before that revision we used to return
EAI_NONAME in most of the cases.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D49411

(cherry picked from commit d803854bccb9ea527c1769ac403e011ff0e121e5)

Details

Provenance
glebiusAuthored on Mar 28 2025, 9:35 PM
Reviewer
kib
Differential Revision
D49411: libc/getaddrinfo(2): return EAI_AGAIN on nameserver timeout
Parents
rGca5be69fb96d: nfsd: Fix the build for 1749465947a8
Branches
Unknown
Tags
Unknown