From c6a8611901a1dc87a038a7c569c5c474c482413f Mon Sep 17 00:00:00 2001 From: glebius Date: Fri, 1 Jul 2005 08:22:13 +0000 Subject: 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 07f293a..83fb9b9 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) { -- cgit v1.1