From owner-freebsd-net Wed Jan 30 3:22: 6 2002 Delivered-To: freebsd-net@freebsd.org Received: from straylight.ringlet.net (discworld.nanolink.com [217.75.135.248]) by hub.freebsd.org (Postfix) with SMTP id 2927D37B404 for ; Wed, 30 Jan 2002 03:21:59 -0800 (PST) Received: (qmail 10252 invoked by uid 1000); 30 Jan 2002 11:21:11 -0000 Date: Wed, 30 Jan 2002 13:21:11 +0200 From: Peter Pentchev To: net@FreeBSD.org Subject: Re: misc/34390: incorrect error with getaddrinfo with hostname+AI_NUMERICHOST Message-ID: <20020130132111.E4374@straylight.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, Does anybody see any possible problems stemming from the patch in the following reply to PR misc/34390? G'luck, Peter -- This sentence was in the past tense. ----- Forwarded message from Peter Pentchev ----- Date: Wed, 30 Jan 2002 13:19:35 +0200 From: Peter Pentchev To: Serge van den Boom Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: misc/34390: incorrect error with getaddrinfo with hostname+AI_NUMERICHOST On Tue, Jan 29, 2002 at 12:06:36AM +0100, Serge van den Boom wrote: > > >Number: 34390 > >Category: misc > >Synopsis: incorrect error with getaddrinfo with hostname+AI_NUMERICHOST > >Originator: Serge van den Boom > >Release: FreeBSD 4.5-RC i386 > >Description: > When using getaddrinfo with AI_NUMERICHOST set in the options field of > the hints structure, and passing a non-numeric host name, EAI_NODATA is > returned. RFC 2553 requires an error code of EAI_NONAME in that case though, > and this is what the getaddrinfo man page also says (in fact it's the same > text). Can you try the following patch? It seems to fix the problem for me. It is made against RELENG_4 sources, but applies cleanly to -CURRENT, too. G'luck, Peter Index: src/lib/libc/net/getaddrinfo.c =================================================================== RCS file: /home/ncvs/src/lib/libc/net/getaddrinfo.c,v retrieving revision 1.9.2.8 diff -u -r1.9.2.8 getaddrinfo.c --- src/lib/libc/net/getaddrinfo.c 15 Jun 2001 22:08:28 -0000 1.9.2.8 +++ src/lib/libc/net/getaddrinfo.c 30 Jan 2002 10:50:07 -0000 @@ -529,7 +529,7 @@ goto good; if (pai->ai_flags & AI_NUMERICHOST) - ERR(EAI_NODATA); + ERR(EAI_NONAME); if (hostname == NULL) ERR(EAI_NODATA); ----- End forwarded message ----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message