summaryrefslogtreecommitdiff
path: root/src/libcharon/plugins/kernel_wfp
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2016-03-24 11:59:32 +0100
committerYves-Alexis Perez <corsac@debian.org>2016-03-24 11:59:32 +0100
commit518dd33c94e041db0444c7d1f33da363bb8e3faf (patch)
treee8d1665ffadff7ec40228dda47e81f8f4691cd07 /src/libcharon/plugins/kernel_wfp
parentf42f239a632306ed082f6fde878977248eea85cf (diff)
downloadvyos-strongswan-518dd33c94e041db0444c7d1f33da363bb8e3faf.tar.gz
vyos-strongswan-518dd33c94e041db0444c7d1f33da363bb8e3faf.zip
Imported Upstream version 5.4.0
Diffstat (limited to 'src/libcharon/plugins/kernel_wfp')
-rw-r--r--src/libcharon/plugins/kernel_wfp/Makefile.am1
-rw-r--r--src/libcharon/plugins/kernel_wfp/Makefile.in3
-rw-r--r--src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c25
3 files changed, 12 insertions, 17 deletions
diff --git a/src/libcharon/plugins/kernel_wfp/Makefile.am b/src/libcharon/plugins/kernel_wfp/Makefile.am
index 85e5089a3..737a79b6c 100644
--- a/src/libcharon/plugins/kernel_wfp/Makefile.am
+++ b/src/libcharon/plugins/kernel_wfp/Makefile.am
@@ -1,6 +1,5 @@
AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan \
- -I$(top_srcdir)/src/libhydra \
-I$(top_srcdir)/src/libcharon
AM_CFLAGS = \
diff --git a/src/libcharon/plugins/kernel_wfp/Makefile.in b/src/libcharon/plugins/kernel_wfp/Makefile.in
index efb214b88..cfe643f26 100644
--- a/src/libcharon/plugins/kernel_wfp/Makefile.in
+++ b/src/libcharon/plugins/kernel_wfp/Makefile.in
@@ -424,6 +424,8 @@ strongswan_conf = @strongswan_conf@
strongswan_options = @strongswan_options@
swanctldir = @swanctldir@
sysconfdir = @sysconfdir@
+systemd_CFLAGS = @systemd_CFLAGS@
+systemd_LIBS = @systemd_LIBS@
systemd_daemon_CFLAGS = @systemd_daemon_CFLAGS@
systemd_daemon_LIBS = @systemd_daemon_LIBS@
systemd_journal_CFLAGS = @systemd_journal_CFLAGS@
@@ -439,7 +441,6 @@ xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan \
- -I$(top_srcdir)/src/libhydra \
-I$(top_srcdir)/src/libcharon
AM_CFLAGS = \
diff --git a/src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c b/src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c
index 95f79f168..e1c429885 100644
--- a/src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c
+++ b/src/libcharon/plugins/kernel_wfp/kernel_wfp_ipsec.c
@@ -20,7 +20,6 @@
#include "kernel_wfp_ipsec.h"
#include <daemon.h>
-#include <hydra.h>
#include <threading/mutex.h>
#include <collections/array.h>
#include <collections/hashtable.h>
@@ -1396,10 +1395,9 @@ static bool uninstall_route(private_kernel_wfp_ipsec_t *this,
{
if (--route->refs == 0)
{
- if (hydra->kernel_interface->get_interface(hydra->kernel_interface,
- src, &name))
+ if (charon->kernel->get_interface(charon->kernel, src, &name))
{
- res = hydra->kernel_interface->del_route(hydra->kernel_interface,
+ res = charon->kernel->del_route(charon->kernel,
dst->get_address(dst), mask, gtw, src, name) == SUCCESS;
free(name);
}
@@ -1442,10 +1440,9 @@ static bool install_route(private_kernel_wfp_ipsec_t *this,
}
else
{
- if (hydra->kernel_interface->get_interface(hydra->kernel_interface,
- src, &name))
+ if (charon->kernel->get_interface(charon->kernel, src, &name))
{
- if (hydra->kernel_interface->add_route(hydra->kernel_interface,
+ if (charon->kernel->add_route(charon->kernel,
dst->get_address(dst), mask, gtw, src, name) == SUCCESS)
{
INIT(route,
@@ -1486,14 +1483,13 @@ static bool manage_route(private_kernel_wfp_ipsec_t *this,
{
return FALSE;
}
- if (hydra->kernel_interface->get_address_by_ts(hydra->kernel_interface,
- src_ts, &src, NULL) != SUCCESS)
+ if (charon->kernel->get_address_by_ts(charon->kernel, src_ts, &src,
+ NULL) != SUCCESS)
{
dst->destroy(dst);
return FALSE;
}
- gtw = hydra->kernel_interface->get_nexthop(hydra->kernel_interface,
- remote, -1, local);
+ gtw = charon->kernel->get_nexthop(charon->kernel, remote, -1, local);
if (add)
{
done = install_route(this, dst, mask, src, gtw);
@@ -1650,8 +1646,7 @@ static void acquire(private_kernel_wfp_ipsec_t *this, UINT64 filter_id,
{
src = src ? src->clone(src) : NULL;
dst = dst ? dst->clone(dst) : NULL;
- hydra->kernel_interface->acquire(hydra->kernel_interface, reqid,
- src, dst);
+ charon->kernel->acquire(charon->kernel, reqid, src, dst);
}
}
@@ -2069,8 +2064,8 @@ static job_requeue_t expire_job(expire_data_t *data)
if (entry)
{
- hydra->kernel_interface->expire(hydra->kernel_interface, protocol,
- data->spi, data->dst, data->hard);
+ charon->kernel->expire(charon->kernel, protocol, data->spi, data->dst,
+ data->hard);
}
return JOB_REQUEUE_NONE;