Commit 83bebbc1 authored by CeRiAl's avatar CeRiAl

Apply and remove nm-l2tp-startup-delay-948193.patch

parent 91ef48e8
The pluto daemon takes some time to initialize. It can't be used
immediately after start-up. Wait for one second before trying to
connect to it.
src/nm-l2tp-service.c | 3 +++
1 file changed, 3 insertions(+)
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
@@ -903,6 +903,9 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin
"PATH=/usr/local/sbin:/usr/sbin:/sbin; export PATH;"
"[ \"x$defaultrouteaddr\" = \"x\" ] && ipsec setup restart");
+ /* Give pluto time to start up */
+ sleep(1);
+
sys += system("PATH=/usr/local/sbin:/usr/sbin:/sbin ipsec whack"
" --listen");
sprintf(cmd1,"test -e /var/run/pluto/ipsec.info && . /var/run/pluto/ipsec.info;"
...@@ -874,6 +874,9 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin, ...@@ -874,6 +874,9 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin,
return nm_l2tp_ipsec_error(error, "Could not restart the ipsec service."); return nm_l2tp_ipsec_error(error, "Could not restart the ipsec service.");
} }
/* Give pluto time to start up */
sleep(1);
sys = system(PATH_PREFIX " ipsec whack --listen"); sys = system(PATH_PREFIX " ipsec whack --listen");
if (sys) { if (sys) {
return nm_l2tp_ipsec_error(error, "Could not talk to IPsec key exchange service."); return nm_l2tp_ipsec_error(error, "Could not talk to IPsec key exchange service.");
......
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