Fix: improved load balancing algorithm
authorfendo <fendo@bi12info.com>
Fri, 2 Aug 2013 11:36:42 +0000 (13:36 +0200)
committerfendo <fendo@bi12info.com>
Fri, 2 Aug 2013 11:36:42 +0000 (13:36 +0200)
grpsess.c

index f38ab1a..a4b63ab 100644 (file)
--- a/grpsess.c
+++ b/grpsess.c
@@ -571,7 +571,7 @@ sessionidt grp_getnextsession(groupidt g, in_addr_t ip, in_addr_t ip_src)
                uint8_t *ad = (uint8_t *) &ip;
                uint16_t ai = ad[3];
                ai <<= 8;
-               ai &= as[3];
+               ai |= as[3];
 
                s = grp_local[g].sid_loaddist[ai];
                if (!s)