From: willy tarreau Date: Sat, 29 Apr 2006 10:11:46 +0000 (+0200) Subject: [MEDIUM] it was not possible to balance between backup servers in source hash mode. X-Git-Tag: v1.2.13~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd655351b8f00057f170cede81888f69bb43a5b1;p=thirdparty%2Fhaproxy.git [MEDIUM] it was not possible to balance between backup servers in source hash mode. --- diff --git a/haproxy.c b/haproxy.c index be05a76db4..319c9537d0 100644 --- a/haproxy.c +++ b/haproxy.c @@ -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);