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)
This commit is contained in:
Gleb Smirnoff 2005-07-01 08:22:13 +00:00
parent 96d951d396
commit a196a3c8aa

View File

@ -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) {