* [PATCH 1/2] ipsec-pool: delete on destroy also the swanctl configuration file
@ 2017-08-16 15:36 Jonatan Schlag
2017-08-16 15:36 ` [PATCH 2/2] ipsec-pools: reload pools after destroying pools Jonatan Schlag
0 siblings, 1 reply; 2+ messages in thread
From: Jonatan Schlag @ 2017-08-16 15:36 UTC (permalink / raw)
To: network
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
Signed-off-by: Jonatan Schlag <jonatan.schlag(a)ipfire.org>
---
src/functions/functions.ipsec-pool | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/functions/functions.ipsec-pool b/src/functions/functions.ipsec-pool
index fb7e7da..86ba81d 100644
--- a/src/functions/functions.ipsec-pool
+++ b/src/functions/functions.ipsec-pool
@@ -229,6 +229,13 @@ ipsec_pool_destroy() {
continue
fi
+ if [ -f "${NETWORK_IPSEC_SWANCTL_POOLS_DIR}/${pool}.conf" ]; then
+ if ! file_delete "${NETWORK_IPSEC_SWANCTL_POOLS_DIR}/${pool}.conf"; then
+ # We going on here to delete at least the configuration directory
+ log ERROR "Could not delete ${NETWORK_IPSEC_SWANCTL_POOLS_DIR}/${pool}.conf"
+ fi
+ fi
+
log DEBUG "Deleting VPN IPsec pool ${pool}"
if ! rm -rf "${NETWORK_IPSEC_POOLS_DIR}/${pool}"; then
--
2.6.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] ipsec-pools: reload pools after destroying pools
2017-08-16 15:36 [PATCH 1/2] ipsec-pool: delete on destroy also the swanctl configuration file Jonatan Schlag
@ 2017-08-16 15:36 ` Jonatan Schlag
0 siblings, 0 replies; 2+ messages in thread
From: Jonatan Schlag @ 2017-08-16 15:36 UTC (permalink / raw)
To: network
[-- Attachment #1: Type: text/plain, Size: 935 bytes --]
Fixes: #11433
Signed-off-by: Jonatan Schlag <jonatan.schlag(a)ipfire.org>
---
src/functions/functions.ipsec-pool | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/functions/functions.ipsec-pool b/src/functions/functions.ipsec-pool
index 86ba81d..8bdd55c 100644
--- a/src/functions/functions.ipsec-pool
+++ b/src/functions/functions.ipsec-pool
@@ -243,6 +243,8 @@ ipsec_pool_destroy() {
return ${EXIT_ERROR}
fi
done
+
+ ipsec_strongswan_load_pools
}
ipsec_pool_set_type() {
@@ -436,3 +438,16 @@ ipsec_list_pools() {
basename ${pool}
done
}
+
+# Reload all strongswan pools
+ipsec_strongswan_load_pools() {
+ # Do nothing if strongswan is not running
+ if ! service_is_active "strongswan"; then
+ return ${EXIT_OK}
+ fi
+
+ if ! cmd swanctl --load-pools; then
+ log ERROR "Could not reload strongswan pools"
+ return ${EXIT_ERROR}
+ fi
+}
--
2.6.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-16 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-16 15:36 [PATCH 1/2] ipsec-pool: delete on destroy also the swanctl configuration file Jonatan Schlag
2017-08-16 15:36 ` [PATCH 2/2] ipsec-pools: reload pools after destroying pools Jonatan Schlag
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox