[NetworkManager-libreswan/nm-1-0: 33/51] service: don't delete connection while it's being upped
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [NetworkManager-libreswan/nm-1-0: 33/51] service: don't delete connection while it's being upped
- Date: Thu, 4 Oct 2018 14:08:27 +0000 (UTC)
commit 636b2a577e8f79af541dee70100d3c66281adfd5
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.
https://bugzilla.redhat.com/show_bug.cgi?id=1271973
(cherry picked from commit f58fde31b3061f131c11dfa48e5d4222e71573fa)
src/nm-openswan-service.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/nm-openswan-service.c b/src/nm-openswan-service.c
index ff795f3..9b22545 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_plugin_failure (NM_VPN_PLUGIN (self), reason);
nm_vpn_plugin_set_state (NM_VPN_PLUGIN (self), NM_VPN_SERVICE_STATE_STOPPED);
@@ -1322,7 +1322,6 @@ real_disconnect (NMVPNPlugin *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]