This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RESEND-2][PATCH][BZ #13760] Fix dns lookup for AF_UNSPEC whenresponse for T_A exceeds buffer size
- From: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>
- To: Andreas Jaeger <aj at suse dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 28 Mar 2012 15:50:56 +0530
- Subject: Re: [RESEND-2][PATCH][BZ #13760] Fix dns lookup for AF_UNSPEC whenresponse for T_A exceeds buffer size
- References: <20120326115650.325c410a@spoyarek><4F72DF3E.1040903@suse.com>
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