This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RESEND-2][PATCH][BZ #13760] Fix dns lookup for AF_UNSPEC whenresponse for T_A exceeds buffer size


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]