ha: Improve distribution of pool addresses over segments
authorTobias Brunner <tobias@strongswan.org>
Tue, 20 Nov 2018 11:50:05 +0000 (12:50 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 7 Dec 2018 09:12:14 +0000 (10:12 +0100)
commita8f91cd4666a1e37c464d1147e35b2cd6540ad80
tree14126e42a3005ce740c44565193fc3a1f4cc3477
parent872b9b3e8defdcb0aa8434cc0304ed9e82355a06
ha: Improve distribution of pool addresses over segments

This is particularly important for higher number of segments, but even
with small numbers there is a significant difference.  For instance,
with 4 segments the fourth segment had no IPs assigned with the old
code, no matter how large the pool, because none of the eight bits used
for the segment check hashed/mapped to it.
src/libcharon/plugins/ha/ha_attribute.c