Commit 28e50254 authored by CeRiAl's avatar CeRiAl

Apply and remove nm-l2tp-track-state-948196.patch

parent afd887bb
The nm-l2tp-service program doesn't keep proper track of the state of
the IPsec connection. Although a flag is tested to see whether the
connection is up, this flag is never set or cleared. As a result, the
connection information doesn't get deleted from the ipsec daemon's
memory after it is taken down, and the daemon keeps trying to
re-establish it.
This patch sets and clears the priv->ipsec_up flag at the appropriate
times.
src/nm-l2tp-service.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: NetworkManager-l2tp-0.9.8.7/src/nm-l2tp-service.c
===================================================================
--- NetworkManager-l2tp-0.9.8.7.orig/src/nm-l2tp-service.c
+++ NetworkManager-l2tp-0.9.8.7/src/nm-l2tp-service.c
@@ -636,6 +636,7 @@ l2tpd_watch_cb (GPid pid, gint status, g
if(priv->ipsec_up) {
nm_l2tp_stop_ipsec();
+ priv->ipsec_up = FALSE;
}
/* Cleaning up config files */
@@ -880,7 +881,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin
NMSettingVPN *s_vpn,
GError **error)
{
- // NML2tpPluginPrivate *priv = NM_L2TP_PLUGIN_GET_PRIVATE (plugin);
+ NML2tpPluginPrivate *priv = NM_L2TP_PLUGIN_GET_PRIVATE (plugin);
const char *ipsec_binary;
const char *value;
char tmp_secrets[128];
@@ -980,6 +981,7 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin
return FALSE;
}
+ priv->ipsec_up = TRUE;
g_message(_("ipsec ready for action"));
return TRUE;
}
@@ -1539,6 +1541,7 @@ real_disconnect (NMVPNPlugin *plugin,
if(priv->ipsec_up) {
nm_l2tp_stop_ipsec();
+ priv->ipsec_up = FALSE;
}
if (priv->connection) {
......@@ -605,6 +605,7 @@ l2tpd_watch_cb (GPid pid, gint status, gpointer user_data)
if(priv->ipsec_up) {
nm_l2tp_stop_ipsec();
priv->ipsec_up = FALSE;
}
/* Cleaning up config files */
......@@ -1478,6 +1479,7 @@ real_disconnect (NMVPNPlugin *plugin,
if(priv->ipsec_up) {
nm_l2tp_stop_ipsec();
priv->ipsec_up = FALSE;
}
if (priv->connection) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment