From beb0ebbb173c1110c5f702d5c37567ac7f74d5df Mon Sep 17 00:00:00 2001 From: Jonatan Schlag Date: Mon, 7 Aug 2017 16:20:11 +0000 Subject: [PATCH] ipsec: fix check if a pool is valid We want to append the pool if the pool exist and if the pool is valid. Not when the pool is invalid and not exists. Signed-off-by: Jonatan Schlag --- src/functions/functions.ipsec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions/functions.ipsec b/src/functions/functions.ipsec index 846ae7e..5213809 100644 --- a/src/functions/functions.ipsec +++ b/src/functions/functions.ipsec @@ -966,7 +966,7 @@ ipsec_connection_pool() { for pool in ${pools_added}; do - if ! ipsec_pool_exists ${pool} && ! ipsec_pool_check_config ${pool}; then + if ipsec_pool_exists ${pool} && ipsec_pool_check_config ${pool}; then if ! list_append_unique "POOLS" ${pool}; then warning "${pool} is already on the prefix list" fi -- 2.39.5