[PATCH] resolv: Add test for NOERROR/NODATA handling [BZ #14308]
Florian Weimer
fweimer@redhat.com
Tue Dec 16 10:52:50 GMT 2025
* Sergey Kolosov:
> Add a test which verifies that getaddrinfo does not fail if one of A/AAAA
> responses is NOERROR/NODATA reply with recursion unavailable and the other
> response provides an address.
> ---
> This patch adds a test for BZ #14308
>
> When getaddrinfo is called with AF_UNSPEC, glibc may issue A and AAAA
> queries. Older glibc versions could fail the entire lookup if one of
> the two responses was a NOERROR/NODATA reply with recursion unavailable
> (RA=0), even if the other response contained a usable address.
>
> The added test (tst-resolv-af-unspec-noerror-nodata) uses resolv_test to
> simulate this situation in both directions:
> - A returns an address, AAAA returns NOERROR/NODATA with RA cleared
> - AAAA returns an address, A returns NOERROR/NODATA with RA cleared
>
> The test fails on an unfixed glibc and passes on glibc with the BZ #14308 fix.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
This looks okay to me, thanks.
Florian
More information about the Libc-alpha
mailing list