This now supports platforms where neither 'ip xfrm' nor 'setkey' are
available (like Android).
ADD_PLUGIN([attr], [h libcharon pluto])
ADD_PLUGIN([attr-sql], [h libcharon pluto])
ADD_PLUGIN([load-tester], [c libcharon])
ADD_PLUGIN([attr], [h libcharon pluto])
ADD_PLUGIN([attr-sql], [h libcharon pluto])
ADD_PLUGIN([load-tester], [c libcharon])
-ADD_PLUGIN([kernel-pfkey], [h libcharon pluto])
-ADD_PLUGIN([kernel-pfroute], [h libcharon pluto])
-ADD_PLUGIN([kernel-klips], [h libcharon pluto])
-ADD_PLUGIN([kernel-netlink], [h libcharon pluto])
+ADD_PLUGIN([kernel-pfkey], [h libcharon pluto starter])
+ADD_PLUGIN([kernel-pfroute], [h libcharon pluto starter])
+ADD_PLUGIN([kernel-klips], [h libcharon pluto starter])
+ADD_PLUGIN([kernel-netlink], [h libcharon pluto starter])
ADD_PLUGIN([resolve], [h libcharon pluto])
ADD_PLUGIN([socket-default], [c libcharon])
ADD_PLUGIN([socket-raw], [c libcharon])
ADD_PLUGIN([resolve], [h libcharon pluto])
ADD_PLUGIN([socket-default], [c libcharon])
ADD_PLUGIN([socket-raw], [c libcharon])
-starter_LDADD = defs.o $(top_builddir)/src/libfreeswan/libfreeswan.a $(top_builddir)/src/libstrongswan/libstrongswan.la $(SOCKLIB)
+starter_LDADD = defs.o $(top_builddir)/src/libfreeswan/libfreeswan.a $(top_builddir)/src/libstrongswan/libstrongswan.la $(top_builddir)/src/libhydra/libhydra.la $(SOCKLIB)
EXTRA_DIST = keywords.txt ipsec.conf
MAINTAINERCLEANFILES = keywords.c
BUILT_SOURCES = parser.h
EXTRA_DIST = keywords.txt ipsec.conf
MAINTAINERCLEANFILES = keywords.c
BUILT_SOURCES = parser.h
#include <stdlib.h>
#include <freeswan.h>
#include <stdlib.h>
#include <freeswan.h>
#include "../pluto/constants.h"
#include "../pluto/defs.h"
#include "../pluto/constants.h"
#include "../pluto/defs.h"
void
starter_netkey_cleanup(void)
{
void
starter_netkey_cleanup(void)
{
- if (system("ip xfrm state > /dev/null 2>&1") == 0)
- {
- ignore_result(system("ip xfrm state flush"));
- ignore_result(system("ip xfrm policy flush"));
- }
- 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");
- }
+ hydra->kernel_interface->flush_sas(hydra->kernel_interface);
+ hydra->kernel_interface->flush_policies(hydra->kernel_interface);
#include <freeswan.h>
#include <library.h>
#include <freeswan.h>
#include <library.h>
#include "../pluto/constants.h"
#include "../pluto/defs.h"
#include "../pluto/constants.h"
#include "../pluto/defs.h"
library_init(NULL);
atexit(library_deinit);
library_init(NULL);
atexit(library_deinit);
+ libhydra_init("starter");
+ atexit(libhydra_deinit);
+
/* parse command line */
for (i = 1; i < argc; i++)
{
/* parse command line */
for (i = 1; i < argc; i++)
{