From 4e382f5ffcb8590b30f8953640eb1e111bf1ced9 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 13 Oct 2016 18:39:09 +0200 Subject: [PATCH] ha: Fix assignment of IP addresses if multiple pools are defined Fixes #2146. --- src/libcharon/plugins/ha/ha_attribute.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libcharon/plugins/ha/ha_attribute.c b/src/libcharon/plugins/ha/ha_attribute.c index b20ef876ad..34d6efc480 100644 --- a/src/libcharon/plugins/ha/ha_attribute.c +++ b/src/libcharon/plugins/ha/ha_attribute.c @@ -215,8 +215,12 @@ METHOD(attribute_provider_t, acquire_address, host_t*, } if (offset == -1) { - DBG1(DBG_CFG, "no address left in HA pool '%s' belonging to" - "a responsible segment", name); + DBG1(DBG_CFG, "no address belonging to a responsible segment left " + "in HA pool '%s'", name); + } + else + { + break; } } this->mutex->unlock(this->mutex); -- 2.47.2