Date: Mon, 30 Jun 2014 16:53:13 +0000 (UTC) From: Hajimu UMEMOTO <ume@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268051 - stable/10/lib/libc/net Message-ID: <201406301653.s5UGrDTb000326@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ume Date: Mon Jun 30 16:53:12 2014 New Revision: 268051 URL: http://svnweb.freebsd.org/changeset/base/268051 Log: MFC r267800: Exclude IPv4 address from doing longest match. It prevented DNS based load balancing. Modified: stable/10/lib/libc/net/getaddrinfo.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/10/lib/libc/net/getaddrinfo.c Mon Jun 30 16:49:00 2014 (r268050) +++ stable/10/lib/libc/net/getaddrinfo.c Mon Jun 30 16:53:12 2014 (r268051) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406301653.s5UGrDTb000326>