]> git.ipfire.org Git - people/jschlag/network.git/commitdiff
ipsec: fix check if a pool is valid
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Mon, 7 Aug 2017 16:20:11 +0000 (16:20 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 7 Aug 2017 16:30:11 +0000 (16:30 +0000)
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 <jonatan.schlag@ipfire.org>
src/functions/functions.ipsec

index 846ae7ea0c23746743c15734d725b1371fede33f..521380943b75b0d8d7efc8cd85cc8447dee59cb9 100644 (file)
@@ -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