Moved all kernel plugins to libhydra.
This commit is contained in:
@@ -135,10 +135,6 @@ LOCAL_SRC_FILES += $(addprefix ../libsimaka/, \
|
||||
)
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES += $(call add_plugin, kernel-netlink)
|
||||
|
||||
LOCAL_SRC_FILES += $(call add_plugin, kernel-pfkey)
|
||||
|
||||
LOCAL_SRC_FILES += $(call add_plugin, load-tester)
|
||||
|
||||
LOCAL_SRC_FILES += $(call add_plugin, socket-default)
|
||||
|
||||
@@ -137,34 +137,6 @@ if MONOLITHIC
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_KERNEL_PFKEY
|
||||
SUBDIRS += plugins/kernel_pfkey
|
||||
if MONOLITHIC
|
||||
libcharon_la_LIBADD += plugins/kernel_pfkey/libstrongswan-kernel-pfkey.la
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_KERNEL_PFROUTE
|
||||
SUBDIRS += plugins/kernel_pfroute
|
||||
if MONOLITHIC
|
||||
libcharon_la_LIBADD += plugins/kernel_pfroute/libstrongswan-kernel-pfroute.la
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_KERNEL_KLIPS
|
||||
SUBDIRS += plugins/kernel_klips
|
||||
if MONOLITHIC
|
||||
libcharon_la_LIBADD += plugins/kernel_klips/libstrongswan-kernel-klips.la
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_KERNEL_NETLINK
|
||||
SUBDIRS += plugins/kernel_netlink
|
||||
if MONOLITHIC
|
||||
libcharon_la_LIBADD += plugins/kernel_netlink/libstrongswan-kernel-netlink.la
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_SOCKET_DEFAULT
|
||||
SUBDIRS += plugins/socket_default
|
||||
if MONOLITHIC
|
||||
|
||||
@@ -21,6 +21,10 @@ processing/scheduler.c processing/scheduler.h
|
||||
|
||||
LOCAL_SRC_FILES += $(call add_plugin, attr)
|
||||
|
||||
LOCAL_SRC_FILES += $(call add_plugin, kernel-pfkey)
|
||||
|
||||
LOCAL_SRC_FILES += $(call add_plugin, kernel-netlink)
|
||||
|
||||
# build libcharon --------------------------------------------------------------
|
||||
|
||||
LOCAL_C_INCLUDES += \
|
||||
|
||||
@@ -48,6 +48,34 @@ if MONOLITHIC
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_KERNEL_PFKEY
|
||||
SUBDIRS += plugins/kernel_pfkey
|
||||
if MONOLITHIC
|
||||
libhydra_la_LIBADD += plugins/kernel_pfkey/libstrongswan-kernel-pfkey.la
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_KERNEL_PFROUTE
|
||||
SUBDIRS += plugins/kernel_pfroute
|
||||
if MONOLITHIC
|
||||
libhydra_la_LIBADD += plugins/kernel_pfroute/libstrongswan-kernel-pfroute.la
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_KERNEL_KLIPS
|
||||
SUBDIRS += plugins/kernel_klips
|
||||
if MONOLITHIC
|
||||
libhydra_la_LIBADD += plugins/kernel_klips/libstrongswan-kernel-klips.la
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_KERNEL_NETLINK
|
||||
SUBDIRS += plugins/kernel_netlink
|
||||
if MONOLITHIC
|
||||
libhydra_la_LIBADD += plugins/kernel_netlink/libstrongswan-kernel-netlink.la
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_RESOLVE
|
||||
SUBDIRS += plugins/resolve
|
||||
if MONOLITHIC
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libhydra \
|
||||
-I$(top_srcdir)/src/libcharon
|
||||
INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libhydra
|
||||
|
||||
AM_CFLAGS = -rdynamic
|
||||
|
||||
+2
-7
@@ -29,7 +29,8 @@
|
||||
#include "kernel_klips_ipsec.h"
|
||||
|
||||
#include <hydra.h>
|
||||
#include <daemon.h>
|
||||
#include <debug.h>
|
||||
#include <utils/linked_list.h>
|
||||
#include <threading/thread.h>
|
||||
#include <threading/mutex.h>
|
||||
#include <processing/jobs/callback_job.h>
|
||||
@@ -1488,9 +1489,6 @@ static job_requeue_t sa_expires(sa_expire_t *expire)
|
||||
}
|
||||
this->mutex->unlock(this->mutex);
|
||||
|
||||
DBG2(DBG_KNL, "%N CHILD_SA with SPI %.8x and reqid {%d} expired",
|
||||
protocol_id_names, protocol, ntohl(spi), reqid);
|
||||
|
||||
hydra->kernel_interface->expire(hydra->kernel_interface, reqid, protocol,
|
||||
spi, hard);
|
||||
return JOB_REQUEUE_NONE;
|
||||
@@ -1537,9 +1535,6 @@ METHOD(kernel_ipsec_t, get_spi, status_t,
|
||||
/* charon's SPIs lie within the range from 0xc0000000 to 0xcFFFFFFF */
|
||||
spi_gen = 0xc0000000 | (spi_gen & 0x0FFFFFFF);
|
||||
|
||||
DBG2(DBG_KNL, "allocated SPI %.8x for %N SA between %#H..%#H",
|
||||
spi_gen, protocol_id_names, protocol, src, dst);
|
||||
|
||||
*spi = htonl(spi_gen);
|
||||
|
||||
this->mutex->lock(this->mutex);
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
/**
|
||||
* @defgroup kernel_klips kernel_klips
|
||||
* @ingroup cplugins
|
||||
* @ingroup hplugins
|
||||
*
|
||||
* @defgroup kernel_klips_plugin kernel_klips_plugin
|
||||
* @{ @ingroup kernel_klips
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
|
||||
INCLUDES = -I${linux_headers} -I$(top_srcdir)/src/libstrongswan \
|
||||
-I$(top_srcdir)/src/libhydra -I$(top_srcdir)/src/libcharon
|
||||
-I$(top_srcdir)/src/libhydra
|
||||
|
||||
AM_CFLAGS = -rdynamic \
|
||||
-DROUTING_TABLE=${routing_table} \
|
||||
@@ -14,7 +14,8 @@ endif
|
||||
|
||||
libstrongswan_kernel_netlink_la_SOURCES = \
|
||||
kernel_netlink_plugin.h kernel_netlink_plugin.c \
|
||||
kernel_netlink_ipsec.h kernel_netlink_ipsec.c kernel_netlink_net.h kernel_netlink_net.c \
|
||||
kernel_netlink_ipsec.h kernel_netlink_ipsec.c \
|
||||
kernel_netlink_net.h kernel_netlink_net.c \
|
||||
kernel_netlink_shared.h kernel_netlink_shared.c
|
||||
|
||||
libstrongswan_kernel_netlink_la_LDFLAGS = -module -avoid-version
|
||||
+1
-1
@@ -36,7 +36,7 @@
|
||||
#include "kernel_netlink_shared.h"
|
||||
|
||||
#include <hydra.h>
|
||||
#include <daemon.h>
|
||||
#include <debug.h>
|
||||
#include <threading/thread.h>
|
||||
#include <threading/mutex.h>
|
||||
#include <utils/hashtable.h>
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
#include "kernel_netlink_shared.h"
|
||||
|
||||
#include <hydra.h>
|
||||
#include <daemon.h>
|
||||
#include <debug.h>
|
||||
#include <threading/thread.h>
|
||||
#include <threading/condvar.h>
|
||||
#include <threading/mutex.h>
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
/**
|
||||
* @defgroup kernel_netlink kernel_netlink
|
||||
* @ingroup cplugins
|
||||
* @ingroup hplugins
|
||||
*
|
||||
* @defgroup kernel_netlink_plugin kernel_netlink_plugin
|
||||
* @{ @ingroup kernel_netlink
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "kernel_netlink_shared.h"
|
||||
|
||||
#include <daemon.h>
|
||||
#include <debug.h>
|
||||
#include <threading/mutex.h>
|
||||
|
||||
typedef struct private_netlink_socket_t private_netlink_socket_t;
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
INCLUDES = -I${linux_headers} -I$(top_srcdir)/src/libstrongswan \
|
||||
-I$(top_srcdir)/src/libhydra -I$(top_srcdir)/src/libcharon
|
||||
-I$(top_srcdir)/src/libhydra
|
||||
|
||||
AM_CFLAGS = -rdynamic
|
||||
|
||||
+2
-1
@@ -55,8 +55,9 @@
|
||||
#include "kernel_pfkey_ipsec.h"
|
||||
|
||||
#include <hydra.h>
|
||||
#include <daemon.h>
|
||||
#include <debug.h>
|
||||
#include <utils/host.h>
|
||||
#include <utils/linked_list.h>
|
||||
#include <threading/thread.h>
|
||||
#include <threading/mutex.h>
|
||||
#include <processing/jobs/callback_job.h>
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
/**
|
||||
* @defgroup kernel_pfkey kernel_pfkey
|
||||
* @ingroup cplugins
|
||||
* @ingroup hplugins
|
||||
*
|
||||
* @defgroup kernel_pfkey_plugin kernel_pfkey_plugin
|
||||
* @{ @ingroup kernel_pfkey
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
INCLUDES = -I${linux_headers} -I$(top_srcdir)/src/libstrongswan \
|
||||
-I$(top_srcdir)/src/libhydra -I$(top_srcdir)/src/libcharon
|
||||
-I$(top_srcdir)/src/libhydra
|
||||
|
||||
AM_CFLAGS = -rdynamic
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
#include "kernel_pfroute_net.h"
|
||||
|
||||
#include <hydra.h>
|
||||
#include <daemon.h>
|
||||
#include <debug.h>
|
||||
#include <utils/host.h>
|
||||
#include <threading/thread.h>
|
||||
#include <threading/mutex.h>
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
|
||||
/**
|
||||
* @defgroup kernel_pfroute kernel_pfroute
|
||||
* @ingroup cplugins
|
||||
* @ingroup hplugins
|
||||
*
|
||||
* @defgroup kernel_pfroute_plugin kernel_pfroute_plugin
|
||||
* @{ @ingroup kernel_pfroute
|
||||
Reference in New Issue
Block a user