]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Change ipsecctrl Tunnel up and down.
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 22 Apr 2010 05:41:28 +0000 (07:41 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 22 Apr 2010 05:41:28 +0000 (07:41 +0200)
doc/packages-list.txt
src/misc-progs/ipsecctrl.c

index d5ed0ef143b71a3f166825cfb2610394a3f45ac1..ea1498dbc5880d7c94998280fab47cf6bb172239 100644 (file)
@@ -62,7 +62,6 @@
 * cacti-0.8.7e
 * calamaris-2.59
 * capi4k-utils-2005-07-18
-* ccache-2.4
 * ccache-3.0pre0
 * cdrtools-2.01.01
 * centerim-4.22.1
index d443edccfc8c151501da47642dbdaf6147afce9b..7205afb37c447d64f1e82dbc4b93301f1789ff8e 100644 (file)
@@ -138,33 +138,25 @@ int decode_line (char *s,
 void turn_connection_on (char *name, char *type) {
         char command[STRING_SIZE];
 
-        safe_system("/usr/sbin/ipsec whack --rereadsecrets >/dev/null");
+        safe_system("/usr/sbin/ipsec whack --rereadall >/dev/null");
         memset(command, 0, STRING_SIZE);
         snprintf(command, STRING_SIZE - 1, 
-                "/usr/sbin/ipsec auto --replace %s >/dev/null", name);
+                "/usr/sbin/ipsec down %s >/dev/null", name);
+        safe_system(command);
+        memset(command, 0, STRING_SIZE);
+        snprintf(command, STRING_SIZE - 1, 
+                "/usr/sbin/ipsec up %s >/dev/null", name);
         safe_system(command);
-        if (strcmp(type, "net") == 0) {
-                memset(command, 0, STRING_SIZE);
-                snprintf(command, STRING_SIZE - 1, 
-                "/usr/sbin/ipsec whack --asynchronous --name %s --initiate >/dev/null", name);
-                safe_system(command);
-        }
 }
 /*
     issue ipsec commmands to turn off connection 'name'
 */
 void turn_connection_off (char *name) {
         char command[STRING_SIZE];
-
-        memset(command, 0, STRING_SIZE);
-        snprintf(command, STRING_SIZE - 1, 
-                "/usr/sbin/ipsec whack --name %s --terminate >/dev/null", name);
-        safe_system(command);
         memset(command, 0, STRING_SIZE);
         snprintf(command, STRING_SIZE - 1, 
-                "/usr/sbin/ipsec whack --delete --name %s >/dev/null", name);
+                "/usr/sbin/ipsec down %s >/dev/null", name);
         safe_system(command);
-        safe_system("/usr/sbin/ipsec whack --rereadsecrets >/dev/null");
 }