[network-manager-openswan] service: don't delete connection while it's being upped

commit f58fde31b3061f131c11dfa48e5d4222e71573fa
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Wed Oct 21 17:12:02 2015 +0200

    service: don't delete connection while it's being upped
    If the user cancels the secrets request while ipsec --up is running, the ipsec
    --down would get stuck (since pluto expects response to secrets on the whack
    management socket). Abort the secrets request by terminating --up first, then
    proceed to delete the connection.

 src/nm-openswan-service.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/nm-openswan-service.c b/src/nm-openswan-service.c
index e1153c6..9b0847b 100644
--- a/src/nm-openswan-service.c
+++ b/src/nm-openswan-service.c
@@ -420,6 +420,7 @@ ipsec_stop (NMOpenSwanPlugin *self, GError **error)
                return TRUE;
        delete_secrets_file (self);
+       connect_cleanup (self);
        if (!priv->managed) {
                argv[i++] = priv->ipsec_path;
@@ -458,7 +459,6 @@ connect_failed (NMOpenSwanPlugin *self,
        if (do_stop)
                ipsec_stop (self, NULL);
-       connect_cleanup (self);
        g_clear_object (&priv->connection);
        nm_vpn_service_plugin_failure (NM_VPN_SERVICE_PLUGIN (self), reason);
@@ -1321,7 +1321,6 @@ real_disconnect (NMVpnServicePlugin *plugin, GError **error)
        gboolean ret;
        ret = ipsec_stop (NM_OPENSWAN_PLUGIN (plugin), error);
-       connect_cleanup (NM_OPENSWAN_PLUGIN (plugin));
        g_clear_object (&priv->connection);
        return ret;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]