[Bug 273912] local_unbound misreporting "Address family for hostname not supported"

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 17 Sep 2023 23:27:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273912

            Bug ID: 273912
           Summary: local_unbound misreporting "Address family for
                    hostname not supported"
           Product: Base System
           Version: 13.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: mb180615@pjb.cc

Overview:

    When a domain name exists but has no A record, the FreeBSD
    13.2 getaddrinfo() system library function returns EAI_SYSTEM
    with an errno value of EAFNOSUPPORT, instead of EAI_NODATA.

    This results in a misleading error message ("Address family
    for hostname not supported", instead of "Name does not
    resolve").

    The problem does not exist in FreeBSD 13.1-RC4 or earlier.

Steps to Reproduce:

    Compile the getaddrinfo.c test program in
    $postfix_source/auxiliary/name-addr-test,
    where $postfix_source is the top-level directory
    of a Postfix source-sode distribution.

    $ cd $postfix_source/auxiliary/name-addr-test
    $ make getaddrinfo

    Run the test program 
    $ ./getaddrinfo host-204-15-78-240-by.yhsrv.com

    Output:
    host host-204-15-78-240-by.yhsrv.com not found: Address family for hostname
not supported 

Additional Information:

    The name host-204-15-78-240-by.yhsrv.com does exist, but it has
    no A record. It does have an HINFO recored, and therefore the
    DNS response is "NOERROR, ANCOUNT zero". This should result
    in an EAI_NODATA result from getaddrinfo(), not EAI_SYSTEM.

    With FreeBSD 13.1-RC4 and earler the result is as expected:
    host host-204-15-78-240-by.yhsrv.com not found: Name does not resolve

-- 
You are receiving this mail because:
You are the assignee for the bug.