diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-10-17 21:23:38 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-10-17 21:23:38 +0200 |
commit | 9d37ad77ef660b92ea51b69d74e14f931d2a04e2 (patch) | |
tree | d6bbb4a5fed1959f8675df9ee7c03713b543fcc9 /src/starter/klips.c | |
parent | 104f57d4b0fb6d7547d6898352eaa5fb4b222010 (diff) | |
parent | e5ee4e7fcdd58b7d86bf1b458da2c63e8e19627b (diff) | |
download | vyos-strongswan-9d37ad77ef660b92ea51b69d74e14f931d2a04e2.tar.gz vyos-strongswan-9d37ad77ef660b92ea51b69d74e14f931d2a04e2.zip |
Merge tag 'v5.1.0-1' into sid
tag strongSwan 5.1.0-1
Diffstat (limited to 'src/starter/klips.c')
-rw-r--r-- | src/starter/klips.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/starter/klips.c b/src/starter/klips.c index 79bd25c44..22165465f 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 <utils/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"); } } |