]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MEDIUM] it was not possible to balance between backup servers in source hash mode.
authorwilly tarreau <willy@wtap.(none)>
Sat, 29 Apr 2006 10:11:46 +0000 (12:11 +0200)
committerwilly tarreau <willy@wtap.(none)>
Sat, 29 Apr 2006 10:11:46 +0000 (12:11 +0200)
haproxy.c

index be05a76db49c1a23e8d3d325f53738ff9bc1e95c..319c9537d055194159a71ab854c7854b6d868e0e 100644 (file)
--- 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);