[MEDIUM] it was not possible to balance between backup servers in source hash mode.

This commit is contained in:
willy tarreau 2006-04-29 12:11:46 +02:00
parent a5e8c663a9
commit cd655351b8

View File

@ -2041,7 +2041,7 @@ static inline struct server *get_server_sh(struct proxy *px, char *addr, int len
return NULL;
l = h = 0;
if (px->srv_act > 1) {
if (px->srv_act > 1 || (px->srv_act == 0 && px->srv_bck > 1)) {
while ((l + sizeof (int)) <= len) {
h ^= ntohl(*(unsigned int *)(&addr[l]));
l += sizeof (int);