Exclude IPv4 address from doing longest match.

It prevented DNS based load balancing.

MFC after:	1 week
This commit is contained in:
ume 2014-06-23 15:43:27 +00:00
parent 0acd6ae59d
commit 1390d13ae6

View File

@ -1009,7 +1009,8 @@ comp_dst(const void *arg1, const void *arg2)
* 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);
}