From a196a3c8aa0a80c5be6f397fade1f6c102661330 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 1 Jul 2005 08:22:13 +0000 Subject: [PATCH] When doing ARP load balancing source IP is taken in network byte order, so residue of division for all hosts on net is the same, and thus only one VHID answers. Change source IP in host byte order. Reviewed by: mlaier Approved by: re (scottl) --- sys/netinet/ip_carp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 07f293adc6c7..83fb9b93f4fe 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1128,7 +1128,7 @@ carp_iamatch(void *v, struct in_ifaddr *ia, } /* this should be a hash, like pf_hash() */ - index = isaddr->s_addr % count; + index = ntohl(isaddr->s_addr) % count; count = 0; TAILQ_FOREACH(vh, &cif->vhif_vrs, sc_list) {