[PATCH] Fix dns lookup for AF_UNSPEC when response for T_A exceeds buffer size

Carlos O'Donell carlos@systemhalted.org
Sat Feb 25 00:44:00 GMT 2012


On Wed, Feb 22, 2012 at 8:12 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> When a dns lookup is made for a host that returns a large number of
> results for A (over 28 records in my test) and a finite number for
> AAAA, getaddrinfo ends up returning only the AAAA records. This is
> because the check that decides whether to process the second response
> or just drop it (resulting in a retry with a larger buffer) is broken.
[snip]
> Attached patch fixes this.
>
> Regards,
> Siddhesh
>
> ----
>
> ChangeLog:
>
> 2012-02-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
>
>        * resolv/nss_dns/dns-host.c (gaih_getanswer): Look for errno
>        in the right place. Discard and retry query if response is
>        larger than input buffer size.

Siddhesh,

Thanks for the patch!

Could you please file an issue in bugzilla for this bug?

That way we can mark it for backports and I can direct someone to review it.

It likely falls under the new network component.

Cheers,
Carlos.



More information about the Libc-alpha mailing list