]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Fix ipsecctrl hang at start of a connection.
authorArne Fitzenreiter <arne_f@ipfire.org>
Mon, 21 Jun 2010 21:13:06 +0000 (23:13 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 21 Jun 2010 21:13:06 +0000 (23:13 +0200)
Fixes bug #0000663

src/misc-progs/ipsecctrl.c

index 16fc86ba3bb9b847ad01835bcd808120f252a2be..d974d6c6a5df66d2f48c581294ab94922b3858c4 100644 (file)
@@ -140,6 +140,8 @@ void turn_connection_on (char *name, char *type) {
 
         safe_system("/usr/sbin/ipsec reload >/dev/null");
         memset(command, 0, STRING_SIZE);
 
         safe_system("/usr/sbin/ipsec reload >/dev/null");
         memset(command, 0, STRING_SIZE);
+        /* give ipsec time to be ready */
+        safe_system("/bin/sleep 2");
         snprintf(command, STRING_SIZE - 1, 
                 "/usr/sbin/ipsec up %s >/dev/null", name);
         safe_system(command);
         snprintf(command, STRING_SIZE - 1, 
                 "/usr/sbin/ipsec up %s >/dev/null", name);
         safe_system(command);