[network-manager-openswan/dcbw/libreswan: 9/16] fixup! determine swan implementation prior to calling ipsec_stop()



commit 7ad39879ec722e3277e1a4276ce96f8a3db96350
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Mon Dec 1 00:59:18 2014 +0100

    fixup! determine swan implementation prior to calling ipsec_stop()

 src/nm-openswan-service.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/nm-openswan-service.c b/src/nm-openswan-service.c
index 769447c..9491733 100644
--- a/src/nm-openswan-service.c
+++ b/src/nm-openswan-service.c
@@ -1050,6 +1050,20 @@ _connect_common (NMVPNPlugin   *plugin,
        if (debug)
                nm_connection_dump (connection);
 
+       priv->ipsec_path = find_helper_bin ("ipsec", error);
+       if (!priv->ipsec_path)
+               return FALSE;
+
+       priv->libreswan = is_libreswan (priv->ipsec_path);
+       if (priv->libreswan) {
+               priv->pluto_path = find_helper_libexec ("pluto", error);
+               if (!priv->pluto_path)
+                       return FALSE;
+               priv->whack_path = find_helper_libexec ("whack", error);
+               if (!priv->whack_path)
+                       return FALSE;
+       }
+
        ipsec_stop (self, NULL);
 
        s_vpn = nm_connection_get_setting_vpn (connection);
@@ -1069,20 +1083,6 @@ _connect_common (NMVPNPlugin   *plugin,
                return FALSE;
        }
 
-       priv->ipsec_path = find_helper_bin ("ipsec", error);
-       if (!priv->ipsec_path)
-               return FALSE;
-
-       priv->libreswan = is_libreswan (priv->ipsec_path);
-       if (priv->libreswan) {
-               priv->pluto_path = find_helper_libexec ("pluto", error);
-               if (!priv->pluto_path)
-                       return FALSE;
-               priv->whack_path = find_helper_libexec ("whack", error);
-               if (!priv->whack_path)
-                       return FALSE;
-       }
-
        priv->password = g_strdup (nm_setting_vpn_get_secret (s_vpn, NM_OPENSWAN_XAUTH_PASSWORD));
 
        /* Write the IPSec secret (group password); *SWAN always requires this and


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