Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- src/functions/functions.ipsec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/functions/functions.ipsec b/src/functions/functions.ipsec index 70931ed..6dc4d5b 100644 --- a/src/functions/functions.ipsec +++ b/src/functions/functions.ipsec @@ -285,7 +285,17 @@ ipsec_connection_exists() {
# Reloads the connection after config changes ipsec_reload() { - return ${EXIT_TRUE} + local connection=${1} + + if ! ipsec_connection_to_strongswan ${connection}; then + log ERROR "Could not generate strongswan config for ${connnection}" + return ${EXIT_ERROR} + fi + + if ! cmd swanctl --load-all; then + log ERROR "Could not reload strongswan config" + return ${EXIT_ERROR} + fi }
# Handle the cli after authentification