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

Details

Provenance
glebiusAuthored on Fri, Mar 28, 9:35 PM
Reviewer
kib
Differential Revision
D49411: libc/getaddrinfo(2): return EAI_AGAIN on nameserver timeout
Parents
rG531345778067: libc/tests: add getaddrinfo test
Branches
Unknown
Tags
Unknown