[PATCH v2][BZ #15339] Avoid returning EAI_SYSTEM when there's a network error

Dmitry V. Levin ldv@altlinux.org
Tue Apr 9 19:50:00 GMT 2013


On Tue, Apr 09, 2013 at 05:08:49PM +0530, Siddhesh Poyarekar wrote:
> On Mon, Apr 08, 2013 at 09:42:39PM +0400, Dmitry V. Levin wrote:
> > The configuration is essentially a bare chroot without additional
> > configuration, the kernel is 3.8.6.  send_dg doesn't call sendmmsg because
> > of buf2 == NULL.
> 
> Aha, so it's AF_INET and not AF_UNSPEC like your original reproducer
> suggested.  Here's an updated patch for 15339.  The major difference
> here is that I had incorrectly concluded that NSS_STATUS_UNAVAIL
> equals to an internal failure.  It's only an internal failure if none
> of the services were usable and in that case too, only when the
> failure was due to something other than not being able to find the nss
> module.  The latter case is implied if NSS_STATUS_UNAVAIL is returned
> as is along with h_errno as NO_RECOVERY.
> 
> Siddhesh
> 
> 	[BZ #15339]
> 	* nss/getXXbyYY_r.c (REENTRANT_NAME): Set NETDB_INTERNAL only
> 	when no services were used.
> 	* sysdeps/posix/getaddrinfo.c (gaih_inet): Set h_errno.
> 	Return EAI_SYSTEM if h_errno is NETDB_INTERNAL.

Looks good and passes all my test cases.  Thanks,


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130409/b3f2aa12/attachment.sig>


More information about the Libc-alpha mailing list