svn commit: r268053 - stable/9/lib/libc/net
Hajimu UMEMOTO
ume at FreeBSD.org
Mon Jun 30 17:03:32 UTC 2014
Author: ume
Date: Mon Jun 30 17:03:32 2014
New Revision: 268053
URL: http://svnweb.freebsd.org/changeset/base/268053
Log:
MFC r267800:
Exclude IPv4 address from doing longest match.
It prevented DNS based load balancing.
Modified:
stable/9/lib/libc/net/getaddrinfo.c
Directory Properties:
stable/9/lib/libc/ (props changed)
Modified: stable/9/lib/libc/net/getaddrinfo.c
==============================================================================
--- stable/9/lib/libc/net/getaddrinfo.c Mon Jun 30 16:56:12 2014 (r268052)
+++ stable/9/lib/libc/net/getaddrinfo.c Mon Jun 30 17:03:32 2014 (r268053)
@@ -1007,7 +1007,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-stable-9
mailing list