Moved all kernel plugins to libhydra.
This commit is contained in:
parent
08c0d340b8
commit
062a602216
24
configure.in
24
configure.in
|
@ -724,12 +724,12 @@ ADD_PLUGIN([gcm], [s libcharon scripts])
|
|||
ADD_PLUGIN([xauth], [p pluto])
|
||||
ADD_PLUGIN([attr], [h libcharon pluto])
|
||||
ADD_PLUGIN([attr-sql], [h libcharon pluto])
|
||||
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([resolve], [h libcharon pluto])
|
||||
ADD_PLUGIN([load-tester], [c libcharon])
|
||||
ADD_PLUGIN([kernel-pfkey], [c libcharon])
|
||||
ADD_PLUGIN([kernel-pfroute], [c libcharon])
|
||||
ADD_PLUGIN([kernel-klips], [c libcharon])
|
||||
ADD_PLUGIN([kernel-netlink], [c libcharon])
|
||||
ADD_PLUGIN([socket-default], [c libcharon])
|
||||
ADD_PLUGIN([socket-raw], [c libcharon])
|
||||
ADD_PLUGIN([socket-dynamic], [c libcharon])
|
||||
|
@ -847,10 +847,6 @@ AM_CONDITIONAL(USE_EAP_TLS, test x$eap_tls = xtrue)
|
|||
AM_CONDITIONAL(USE_EAP_TTLS, test x$eap_ttls = xtrue)
|
||||
AM_CONDITIONAL(USE_EAP_TNC, test x$eap_tnc = xtrue)
|
||||
AM_CONDITIONAL(USE_EAP_RADIUS, test x$eap_radius = xtrue)
|
||||
AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue)
|
||||
AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue)
|
||||
AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue)
|
||||
AM_CONDITIONAL(USE_KERNEL_KLIPS, test x$kernel_klips = xtrue)
|
||||
AM_CONDITIONAL(USE_SOCKET_DEFAULT, test x$socket_default = xtrue)
|
||||
AM_CONDITIONAL(USE_SOCKET_RAW, test x$socket_raw = xtrue)
|
||||
AM_CONDITIONAL(USE_SOCKET_DYNAMIC, test x$socket_dynamic = xtrue)
|
||||
|
@ -861,6 +857,10 @@ dnl hydra plugins
|
|||
dnl =============
|
||||
AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue)
|
||||
AM_CONDITIONAL(USE_ATTR_SQL, test x$attr_sql = xtrue -o x$sql = xtrue)
|
||||
AM_CONDITIONAL(USE_KERNEL_KLIPS, test x$kernel_klips = xtrue)
|
||||
AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue)
|
||||
AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue)
|
||||
AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue)
|
||||
AM_CONDITIONAL(USE_RESOLVE, test x$resolve = xtrue)
|
||||
|
||||
dnl pluto plugins
|
||||
|
@ -955,6 +955,10 @@ AC_OUTPUT(
|
|||
src/libhydra/Makefile
|
||||
src/libhydra/plugins/attr/Makefile
|
||||
src/libhydra/plugins/attr_sql/Makefile
|
||||
src/libhydra/plugins/kernel_klips/Makefile
|
||||
src/libhydra/plugins/kernel_netlink/Makefile
|
||||
src/libhydra/plugins/kernel_pfkey/Makefile
|
||||
src/libhydra/plugins/kernel_pfroute/Makefile
|
||||
src/libhydra/plugins/resolve/Makefile
|
||||
src/libfreeswan/Makefile
|
||||
src/libsimaka/Makefile
|
||||
|
@ -979,10 +983,6 @@ AC_OUTPUT(
|
|||
src/libcharon/plugins/eap_ttls/Makefile
|
||||
src/libcharon/plugins/eap_tnc/Makefile
|
||||
src/libcharon/plugins/eap_radius/Makefile
|
||||
src/libcharon/plugins/kernel_netlink/Makefile
|
||||
src/libcharon/plugins/kernel_pfkey/Makefile
|
||||
src/libcharon/plugins/kernel_pfroute/Makefile
|
||||
src/libcharon/plugins/kernel_klips/Makefile
|
||||
src/libcharon/plugins/socket_default/Makefile
|
||||
src/libcharon/plugins/socket_raw/Makefile
|
||||
src/libcharon/plugins/socket_dynamic/Makefile
|
||||
|
|
|
@ -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,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
|
||||
|
|
@ -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);
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
/**
|
||||
* @defgroup kernel_klips kernel_klips
|
||||
* @ingroup cplugins
|
||||
* @ingroup hplugins
|
||||
*
|
||||
* @defgroup kernel_klips_plugin kernel_klips_plugin
|
||||
* @{ @ingroup kernel_klips
|
|
@ -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
|
|
@ -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>
|
|
@ -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>
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
/**
|
||||
* @defgroup kernel_netlink kernel_netlink
|
||||
* @ingroup cplugins
|
||||
* @ingroup hplugins
|
||||
*
|
||||
* @defgroup kernel_netlink_plugin kernel_netlink_plugin
|
||||
* @{ @ingroup kernel_netlink
|
|
@ -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,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
|
||||
|
|
@ -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>
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
/**
|
||||
* @defgroup kernel_pfkey kernel_pfkey
|
||||
* @ingroup cplugins
|
||||
* @ingroup hplugins
|
||||
*
|
||||
* @defgroup kernel_pfkey_plugin kernel_pfkey_plugin
|
||||
* @{ @ingroup kernel_pfkey
|
|
@ -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
|
||||
|
|
@ -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>
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
/**
|
||||
* @defgroup kernel_pfroute kernel_pfroute
|
||||
* @ingroup cplugins
|
||||
* @ingroup hplugins
|
||||
*
|
||||
* @defgroup kernel_pfroute_plugin kernel_pfroute_plugin
|
||||
* @{ @ingroup kernel_pfroute
|
Loading…
Reference in New Issue