Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2009 17:50:05 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-net@FreeBSD.org
Subject:   Re: bin/51827: commit references a PR
Message-ID:  <200903241750.n2OHo5g5052996@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/51827; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/51827: commit references a PR
Date: Tue, 24 Mar 2009 17:47:37 +0000 (UTC)

 Author: ume
 Date: Tue Mar 24 17:47:24 2009
 New Revision: 190382
 URL: http://svn.freebsd.org/changeset/base/190382
 
 Log:
   getaddrinfo(3) should accept numeric when ai_socktype is not
   specified in hint or hints is NULL.
   
   PR:		bin/51827
   Submitted by:	Mark Andrews <marka__at__isc.org>
   MFC after:	1 week
 
 Modified:
   head/lib/libc/net/getaddrinfo.c
 
 Modified: head/lib/libc/net/getaddrinfo.c
 ==============================================================================
 --- head/lib/libc/net/getaddrinfo.c	Tue Mar 24 17:22:10 2009	(r190381)
 +++ head/lib/libc/net/getaddrinfo.c	Tue Mar 24 17:47:24 2009	(r190382)
 @@ -1347,7 +1347,17 @@ get_port(struct addrinfo *ai, const char
  		allownumeric = 1;
  		break;
  	case ANY:
 -		allownumeric = 0;
 +		switch (ai->ai_family) {
 +		case AF_INET:
 +#ifdef AF_INET6
 +		case AF_INET6:
 +#endif
 +			allownumeric = 1;
 +			break;
 +		default:
 +			allownumeric = 0;
 +			break;
 +		}
  		break;
  	default:
  		return EAI_SOCKTYPE;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903241750.n2OHo5g5052996>