summaryrefslogtreecommitdiff
path: root/src/starter/klips.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2013-01-02 14:18:20 +0100
committerYves-Alexis Perez <corsac@debian.org>2013-01-02 14:18:20 +0100
commitc1343b3278cdf99533b7902744d15969f9d6fdc1 (patch)
treed5ed3dc5677a59260ec41cd39bb284d3e94c91b3 /src/starter/klips.c
parentb34738ed08c2227300d554b139e2495ca5da97d6 (diff)
downloadvyos-strongswan-c1343b3278cdf99533b7902744d15969f9d6fdc1.tar.gz
vyos-strongswan-c1343b3278cdf99533b7902744d15969f9d6fdc1.zip
Imported Upstream version 5.0.1
Diffstat (limited to 'src/starter/klips.c')
-rw-r--r--src/starter/klips.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/starter/klips.c b/src/starter/klips.c
index 79bd25c44..484b7e281 100644
--- a/src/starter/klips.c
+++ b/src/starter/klips.c
@@ -16,16 +16,12 @@
#include <sys/stat.h>
#include <stdlib.h>
-#include <freeswan.h>
-
-#include "../pluto/constants.h"
-#include "../pluto/defs.h"
-#include "../pluto/log.h"
+#include <library.h>
+#include <debug.h>
#include "files.h"
-bool
-starter_klips_init(void)
+bool starter_klips_init(void)
{
struct stat stb;
@@ -40,9 +36,7 @@ starter_klips_init(void)
/* now test again */
if (stat(PROC_KLIPS, &stb) != 0)
{
- DBG(DBG_CONTROL,
- DBG_log("kernel appears to lack the KLIPS IPsec stack")
- )
+ DBG2(DBG_APP, "kernel appears to lack the KLIPS IPsec stack");
return FALSE;
}
}
@@ -52,29 +46,25 @@ starter_klips_init(void)
ignore_result(system("modprobe -qv ipsec_blowfish"));
ignore_result(system("modprobe -qv ipsec_sha2"));
- DBG(DBG_CONTROL,
- DBG_log("Found KLIPS IPsec stack")
- )
-
+ DBG2(DBG_APP, "found KLIPS IPsec stack");
return TRUE;
}
-void
-starter_klips_cleanup(void)
+void starter_klips_cleanup(void)
{
if (system("type eroute > /dev/null 2>&1") == 0)
{
ignore_result(system("spi --clear"));
ignore_result(system("eroute --clear"));
}
- else if (system("type setkey > /dev/null 2>&1") == 0)
+ else if (system("type setkey > /dev/null 2>&1") == 0)
{
ignore_result(system("setkey -F"));
ignore_result(system("setkey -FP"));
}
else
{
- plog("WARNING: cannot flush IPsec state/policy database");
+ DBG1(DBG_APP, "WARNING: cannot flush IPsec state/policy database");
}
}