summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-07-01 08:22:13 +0000
committerglebius <glebius@FreeBSD.org>2005-07-01 08:22:13 +0000
commitc6a8611901a1dc87a038a7c569c5c474c482413f (patch)
treeb18a1417576f350a90836472957c0a6bad7ee060 /sys/netinet
parent12adb900dc9c87084c520df00e514c20714ffe08 (diff)
downloadFreeBSD-src-c6a8611901a1dc87a038a7c569c5c474c482413f.zip
FreeBSD-src-c6a8611901a1dc87a038a7c569c5c474c482413f.tar.gz
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)
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_carp.c2
1 files changed, 1 insertions, 1 deletions
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) {
OpenPOWER on IntegriCloud