aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-01-16 22:06:10 +0100
committerFlorin Coras <florin.coras@gmail.com>2017-01-16 23:19:46 +0000
commita9a951f8e5ed6e172fbfbdbb6cb690c67fa2f715 (patch)
tree1a976cda2a242e013101124b9ed686a2811ae9a1
parent597d3c4121b4dd557328c11debb42927a45d52fb (diff)
Add --without-libssl configure parameter
This replaces --without-ipsec and --without-ipv6sr and allows other parts of the code to be disabled if libssl is not available. Change-Id: Id97ff3685a7924d7f86622952e0405d94ceb5957 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--build-data/platforms/arm32.mk4
-rw-r--r--build-data/platforms/dpaa2.mk8
-rw-r--r--build-data/platforms/qppc.mk4
-rw-r--r--build-data/platforms/thunder.mk4
-rw-r--r--src/configure.ac6
-rw-r--r--src/vnet.am6
-rw-r--r--src/vnet/ipsec/ipsec_api.c24
-rw-r--r--src/vnet/ipsec/ipsec_output.c2
-rw-r--r--src/vpp/api/api.c2
9 files changed, 29 insertions, 31 deletions
diff --git a/build-data/platforms/arm32.mk b/build-data/platforms/arm32.mk
index 7b80061b2ea..47d4ad5ada7 100644
--- a/build-data/platforms/arm32.mk
+++ b/build-data/platforms/arm32.mk
@@ -22,8 +22,8 @@ arm32_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
jvpp gmod
vlib_configure_args_arm32 = --with-pre-data=128
-vnet_configure_args_arm32 = --with-dpdk --without-ipsec --without-ipv6sr
-vpp_configure_args_arm32 = --with-dpdk --without-ipsec --without-ipv6sr
+vnet_configure_args_arm32 = --with-dpdk --without-libssl
+vpp_configure_args_arm32 = --with-dpdk --without-libssl
arm32_dpdk_arch = "armv7a"
arm32_dpdk_target = "arm-armv7a-linuxapp-gcc"
diff --git a/build-data/platforms/dpaa2.mk b/build-data/platforms/dpaa2.mk
index 0ec627a48ef..2d4745acc56 100644
--- a/build-data/platforms/dpaa2.mk
+++ b/build-data/platforms/dpaa2.mk
@@ -42,10 +42,10 @@ dpaa2_dpdk_make_extra_args = "CROSS=$(dpaa2_target)- DPDK_PKTMBUF_HEADROOM=256"
endif
endif
-vpp_configure_args_dpaa2 = --with-dpdk --without-ipsec \
- --without-ipv6sr --with-sysroot=$(SYSROOT)
-vnet_configure_args_dpaa2 = --with-dpdk --without-ipsec \
- --without-ipv6sr --with-sysroot=$(SYSROOT)
+vpp_configure_args_dpaa2 = --with-dpdk --without-libssl \
+ --with-sysroot=$(SYSROOT)
+vnet_configure_args_dpaa2 = --with-dpdk --without-libssl \
+ --with-sysroot=$(SYSROOT)
# Set these parameters carefully. The vlib_buffer_t is 256 bytes, i.e.
vlib_configure_args_dpaa2 = --with-pre-data=256
diff --git a/build-data/platforms/qppc.mk b/build-data/platforms/qppc.mk
index 244747e7fa4..983684fc6a3 100644
--- a/build-data/platforms/qppc.mk
+++ b/build-data/platforms/qppc.mk
@@ -11,10 +11,10 @@ qppc_root_packages = vppinfra vlib vlib-api vnet svm \
vpp vpp-api-test
vnet_configure_args_qppc = \
- --without-ipsec --without-ipv6sr
+ --without-libssl
vpp_configure_args_qppc = \
- --without-ipsec --without-ipv6sr
+ --without-libssl
vlib_configure_args_qppc = --with-pre-data=128
diff --git a/build-data/platforms/thunder.mk b/build-data/platforms/thunder.mk
index f891f4a1589..31b6a510576 100644
--- a/build-data/platforms/thunder.mk
+++ b/build-data/platforms/thunder.mk
@@ -15,10 +15,10 @@ thunder_root_packages = vppinfra vlib-cavium-dpdk vnet-cavium-dpdk cavium-dpdk \
vpp-cavium-dpdk vpp-api-test-cavium-dpdk
vnet-cavium-dpdk_configure_args_thunder = \
- --with-dpdk --without-ipsec --without-ipv6sr
+ --with-dpdk --without-libssl
vpp-cavium-dpdk_configure_args_thunder = \
- --with-dpdk --without-ipsec --without-ipv6sr
+ --with-dpdk --without-libssl
cavium-dpdk_configure_args_thunder = --with-headroom=256
diff --git a/src/configure.ac b/src/configure.ac
index eb380d8bf20..b2234448db7 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -101,8 +101,7 @@ WITH_ARG(dpdk_crypto, [Use DPDK cryptodev])
WITH_ARG(dpdk_mlx5_pmd, [Use DPDK with mlx5 PMD])
# --without-X
-WITHOUT_ARG(ipsec, [Disable IPSec])
-WITHOUT_ARG(ipv6sr, [Disable IPv6 SR])
+WITHOUT_ARG(libssl, [Disable libssl])
WITHOUT_ARG(apicli, [Disable binary api CLI])
AC_ARG_WITH(unix,
@@ -133,8 +132,7 @@ AC_SUBST(APICLI, [-DVPP_API_TEST_BUILTIN=${n_with_apicli}])
AC_DEFINE_UNQUOTED(DPDK, [${n_with_dpdk}])
AC_DEFINE_UNQUOTED(DPDK_SHARED_LIB, [${n_enable_dpdk_shared}])
AC_DEFINE_UNQUOTED(DPDK_CRYPTO, [${n_with_dpdk_crypto}])
-AC_DEFINE_UNQUOTED(IPSEC, [${n_with_ipsec}])
-AC_DEFINE_UNQUOTED(IPV6SR, [${n_with_ipv6sr}])
+AC_DEFINE_UNQUOTED(WITH_LIBSSL, [${n_with_libssl}])
# Silence following noise:
diff --git a/src/vnet.am b/src/vnet.am
index 3b2a25e8654..93dd1e6c8ec 100644
--- a/src/vnet.am
+++ b/src/vnet.am
@@ -26,7 +26,7 @@ libvnet_la_DEPENDENCIES = \
libvnet_la_LIBADD = $(libvnet_la_DEPENDENCIES) -lm -lpthread -ldl -lrt $(DPDK_LD_ADD)
libvnet_la_LDFLAGS = $(DPDK_LD_FLAGS)
-if WITH_IPV6SR
+if WITH_LIBSSL
libvnet_la_LIBADD += -lcrypto
endif
@@ -372,7 +372,7 @@ API_FILES += vnet/bfd/bfd.api
########################################
# Layer 3 protocol: IPSec
########################################
-if WITH_IPSEC
+if WITH_LIBSSL
libvnet_la_SOURCES += \
vnet/ipsec/ipsec.c \
vnet/ipsec/ipsec_cli.c \
@@ -673,7 +673,7 @@ nobase_include_HEADERS += \
# ipv6 segment routing
########################################
-if WITH_IPV6SR
+if WITH_LIBSSL
libvnet_la_SOURCES += \
vnet/sr/sr.c \
vnet/sr/sr_replicate.c \
diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c
index 30cc5bd2421..9bcf63b45c2 100644
--- a/src/vnet/ipsec/ipsec_api.c
+++ b/src/vnet/ipsec/ipsec_api.c
@@ -26,7 +26,7 @@
#include <vnet/vnet_msg_enum.h>
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
#include <vnet/ipsec/ipsec.h>
#include <vnet/ipsec/ikev2.h>
#endif /* IPSEC */
@@ -63,7 +63,7 @@ _(IKEV2_SET_LOCAL_KEY, ikev2_set_local_key)
static void vl_api_ipsec_spd_add_del_t_handler
(vl_api_ipsec_spd_add_del_t * mp)
{
-#if IPSEC == 0
+#if WITH_LIBSSL == 0
clib_warning ("unimplemented");
#else
@@ -95,7 +95,7 @@ static void vl_api_ipsec_interface_add_del_spd_t_handler
VALIDATE_SW_IF_INDEX (mp);
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
rv = ipsec_set_interface_spd (vm, sw_if_index, spd_id, mp->is_add);
#else
rv = VNET_API_ERROR_UNIMPLEMENTED;
@@ -113,7 +113,7 @@ static void vl_api_ipsec_spd_add_del_entry_t_handler
vl_api_ipsec_spd_add_del_entry_reply_t *rmp;
int rv;
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
ipsec_policy_t p;
memset (&p, 0, sizeof (p));
@@ -176,7 +176,7 @@ static void vl_api_ipsec_sad_add_del_entry_t_handler
vlib_main_t *vm __attribute__ ((unused)) = vlib_get_main ();
vl_api_ipsec_sad_add_del_entry_reply_t *rmp;
int rv;
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
ipsec_sa_t sa;
memset (&sa, 0, sizeof (sa));
@@ -324,7 +324,7 @@ vl_api_ipsec_spd_dump_t_handler (vl_api_ipsec_spd_dump_t * mp)
ipsec_spd_t *spd;
uword *p;
u32 spd_index;
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
q = vl_api_client_index_to_input_queue (mp->client_index);
if (q == 0)
return;
@@ -355,7 +355,7 @@ vl_api_ipsec_sa_set_key_t_handler (vl_api_ipsec_sa_set_key_t * mp)
vlib_main_t *vm __attribute__ ((unused)) = vlib_get_main ();
vl_api_ipsec_sa_set_key_reply_t *rmp;
int rv;
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
ipsec_sa_t sa;
sa.id = ntohl (mp->sa_id);
sa.crypto_key_len = mp->crypto_key_length;
@@ -377,7 +377,7 @@ vl_api_ikev2_profile_add_del_t_handler (vl_api_ikev2_profile_add_del_t * mp)
vl_api_ikev2_profile_add_del_reply_t *rmp;
int rv = 0;
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
vlib_main_t *vm = vlib_get_main ();
clib_error_t *error;
u8 *tmp = format (0, "%s", mp->name);
@@ -399,7 +399,7 @@ static void
vl_api_ikev2_profile_set_auth_reply_t *rmp;
int rv = 0;
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
vlib_main_t *vm = vlib_get_main ();
clib_error_t *error;
u8 *tmp = format (0, "%s", mp->name);
@@ -423,7 +423,7 @@ vl_api_ikev2_profile_set_id_t_handler (vl_api_ikev2_profile_set_id_t * mp)
vl_api_ikev2_profile_add_del_reply_t *rmp;
int rv = 0;
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
vlib_main_t *vm = vlib_get_main ();
clib_error_t *error;
u8 *tmp = format (0, "%s", mp->name);
@@ -447,7 +447,7 @@ vl_api_ikev2_profile_set_ts_t_handler (vl_api_ikev2_profile_set_ts_t * mp)
vl_api_ikev2_profile_set_ts_reply_t *rmp;
int rv = 0;
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
vlib_main_t *vm = vlib_get_main ();
clib_error_t *error;
u8 *tmp = format (0, "%s", mp->name);
@@ -470,7 +470,7 @@ vl_api_ikev2_set_local_key_t_handler (vl_api_ikev2_set_local_key_t * mp)
vl_api_ikev2_profile_set_ts_reply_t *rmp;
int rv = 0;
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
vlib_main_t *vm = vlib_get_main ();
clib_error_t *error;
diff --git a/src/vnet/ipsec/ipsec_output.c b/src/vnet/ipsec/ipsec_output.c
index 97977899132..df93b5e4d4c 100644
--- a/src/vnet/ipsec/ipsec_output.c
+++ b/src/vnet/ipsec/ipsec_output.c
@@ -27,7 +27,7 @@
#define ESP_NODE "esp-encrypt"
#endif
-#if IPSEC > 0
+#if WITH_LIBSSL > 0
#define foreach_ipsec_output_next \
_(DROP, "error-drop") \
diff --git a/src/vpp/api/api.c b/src/vpp/api/api.c
index 3d6905dd655..3afc3383895 100644
--- a/src/vpp/api/api.c
+++ b/src/vpp/api/api.c
@@ -54,7 +54,7 @@
#include <vnet/ip/ip6_neighbor.h>
#include <vnet/dhcp/proxy.h>
#include <vnet/dhcp/client.h>
-#if IPV6SR > 0
+#if WITH_LIBSSL > 0
#include <vnet/sr/sr.h>
#endif
#include <vnet/dhcpv6/proxy.h>