[RESEND-2][PATCH][BZ #13760] Fix dns lookup for AF_UNSPEC when response for T_A exceeds buffer size
Siddhesh Poyarekar
siddhesh.poyarekar@gmail.com
Wed Mar 28 10:21:00 GMT 2012
On Wed, Mar 28, 2012 at 3:21 PM, Andreas Jaeger <aj@suse.com> wrote:
>> The current check looks for the ERANGE error in 'errno' when it should
>> be looking for it in *errnop (where gaih_getanswer_slice sets
>
>
> The single change for *errnop is ok.
>
>> it). Also, we should discard the second response and retry the query
>> in case of NSS_STATUS_TRYAGAIN and ERANGE (buffer too small) only when
>> the response error is recoverable. The only condition in which this
>> currently occurs (buffer too small and h_errno is NO_RECOVERY) is when
>> the hostname returned by the query is longer than MAXHOSTNAMELEN.
>
>
> I don't see how this is addressed with your change. Is the patch incomplete
> - or what do I miss?
>
Thanks for the review. The same line has two changes: using *errnop
instead of errno and the changed condition, which addresses what I
described above:
*h_errnop != NO_RECOVERY
to
*h_errnop == NO_RECOVERY
I guess the missing bz entry in the ChangeLog is for the other patch?
2012-02-22 Siddhesh Poyarekar <siddhesh@redhat.com>
[BZ #13760]
* 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 Poyarekar
http://siddhesh.in
More information about the Libc-alpha
mailing list