Date: Mon, 23 Jun 2014 15:43:27 +0000 (UTC) From: Hajimu UMEMOTO <ume@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267800 - head/lib/libc/net Message-ID: <201406231543.s5NFhRa7000583@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406231543.s5NFhRa7000583>