]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
ha: Divide virtual IPs evenly among all segments
authorTobias Brunner <tobias@strongswan.org>
Tue, 20 Nov 2018 15:40:21 +0000 (16:40 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 7 Dec 2018 09:15:40 +0000 (10:15 +0100)
src/libcharon/plugins/ha/ha_attribute.c

index 224e223621bd6aab713df7ac67e562a82d6649fb..2553fd01431c3263bdf24b774e84804ad9de805d 100644 (file)
@@ -165,7 +165,7 @@ static bool responsible_for(private_ha_attribute_t *this, int offset)
 {
        u_int segment;
 
-       segment = this->kernel->get_segment_int(this->kernel, offset);
+       segment = offset % this->segments->count(this->segments) + 1;
        return this->segments->is_active(this->segments, segment);
 }