svn commit: r267800 - head/lib/libc/net
Hajimu UMEMOTO
ume at FreeBSD.org
Mon Jun 23 15:43:28 UTC 2014
Author: ume
Date: Mon Jun 23 15:43:27 2014
New Revision: 267800
URL: http://svnweb.freebsd.org/changeset/base/267800
Log:
Exclude IPv4 address from doing longest match.
It prevented DNS based load balancing.
MFC after: 1 week
Modified:
head/lib/libc/net/getaddrinfo.c
Modified: head/lib/libc/net/getaddrinfo.c
==============================================================================
--- head/lib/libc/net/getaddrinfo.c Mon Jun 23 15:04:32 2014 (r267799)
+++ head/lib/libc/net/getaddrinfo.c Mon Jun 23 15:43:27 2014 (r267800)
@@ -1009,7 +1009,8 @@ comp_dst(const void *arg1, const void *a
* We compare the match length in a same AF only.
*/
if (dst1->aio_ai->ai_addr->sa_family ==
- dst2->aio_ai->ai_addr->sa_family) {
+ dst2->aio_ai->ai_addr->sa_family &&
+ dst1->aio_ai->ai_addr->sa_family != AF_INET) {
if (dst1->aio_matchlen > dst2->aio_matchlen) {
return(-1);
}
More information about the svn-src-all
mailing list