From 5dbb826da5eb11f5f5d3380185b082c9e6f2fe01 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 20 Nov 2018 16:40:21 +0100 Subject: [PATCH] ha: Divide virtual IPs evenly among all segments --- src/libcharon/plugins/ha/ha_attribute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcharon/plugins/ha/ha_attribute.c b/src/libcharon/plugins/ha/ha_attribute.c index 224e22362..2553fd014 100644 --- a/src/libcharon/plugins/ha/ha_attribute.c +++ b/src/libcharon/plugins/ha/ha_attribute.c @@ -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); }