summaryrefslogtreecommitdiff
path: root/src/libfreeswan
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
committerYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
commitb34738ed08c2227300d554b139e2495ca5da97d6 (patch)
tree62f33b52820f2e49f0e53c0f8c636312037c8054 /src/libfreeswan
parent0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff)
downloadvyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz
vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip
Imported Upstream version 4.6.4
Diffstat (limited to 'src/libfreeswan')
-rw-r--r--src/libfreeswan/Android.mk38
-rw-r--r--src/libfreeswan/Makefile.am20
-rw-r--r--src/libfreeswan/Makefile.in27
-rw-r--r--src/libfreeswan/datatot.c1
-rw-r--r--src/libfreeswan/pfkey_v2_parse.c4
5 files changed, 69 insertions, 21 deletions
diff --git a/src/libfreeswan/Android.mk b/src/libfreeswan/Android.mk
new file mode 100644
index 000000000..a834d4846
--- /dev/null
+++ b/src/libfreeswan/Android.mk
@@ -0,0 +1,38 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+# copy-n-paste from Makefile.am
+LOCAL_SRC_FILES := \
+addrtoa.c addrtot.c addrtypeof.c anyaddr.c atoaddr.c atoasr.c \
+atosubnet.c atoul.c copyright.c datatot.c freeswan.h \
+goodmask.c initaddr.c initsaid.c initsubnet.c internal.h ipsec_param.h \
+pfkey_v2_build.c pfkey_v2_debug.c \
+pfkey_v2_ext_bits.c pfkey_v2_parse.c portof.c rangetoa.c \
+pfkey.h pfkeyv2.h rangetosubnet.c sameaddr.c \
+satot.c subnetof.c subnettoa.c subnettot.c \
+subnettypeof.c ttoaddr.c ttodata.c ttoprotoport.c ttosa.c ttosubnet.c ttoul.c \
+ultoa.c ultot.c
+
+# build libfreeswan ------------------------------------------------------------
+
+LOCAL_C_INCLUDES += \
+ $(libvstr_PATH) \
+ $(strongswan_PATH)/src/include \
+ $(strongswan_PATH)/src/libstrongswan \
+ $(strongswan_PATH)/src/libhydra \
+ $(strongswan_PATH)/src/pluto
+
+LOCAL_CFLAGS := $(strongswan_CFLAGS)
+
+LOCAL_MODULE := libfreeswan
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_ARM_MODE := arm
+
+LOCAL_PRELINK_MODULE := false
+
+LOCAL_SHARED_LIBRARIES += libstrongswan
+
+include $(BUILD_SHARED_LIBRARY)
+
diff --git a/src/libfreeswan/Makefile.am b/src/libfreeswan/Makefile.am
index 09f5fe2cd..b38343d34 100644
--- a/src/libfreeswan/Makefile.am
+++ b/src/libfreeswan/Makefile.am
@@ -1,13 +1,14 @@
noinst_LIBRARIES = libfreeswan.a
-libfreeswan_a_SOURCES = addrtoa.c addrtot.c addrtypeof.c anyaddr.c atoaddr.c atoasr.c \
- atosubnet.c atoul.c copyright.c datatot.c freeswan.h \
- goodmask.c initaddr.c initsaid.c initsubnet.c internal.h ipsec_param.h \
- pfkey_v2_build.c pfkey_v2_debug.c \
- pfkey_v2_ext_bits.c pfkey_v2_parse.c portof.c rangetoa.c \
- pfkey.h pfkeyv2.h rangetosubnet.c sameaddr.c \
- satot.c subnetof.c subnettoa.c subnettot.c \
- subnettypeof.c ttoaddr.c ttodata.c ttoprotoport.c ttosa.c ttosubnet.c ttoul.c \
- ultoa.c ultot.c
+libfreeswan_a_SOURCES = \
+addrtoa.c addrtot.c addrtypeof.c anyaddr.c atoaddr.c atoasr.c \
+atosubnet.c atoul.c copyright.c datatot.c freeswan.h \
+goodmask.c initaddr.c initsaid.c initsubnet.c internal.h ipsec_param.h \
+pfkey_v2_build.c pfkey_v2_debug.c \
+pfkey_v2_ext_bits.c pfkey_v2_parse.c portof.c rangetoa.c \
+pfkey.h pfkeyv2.h rangetosubnet.c sameaddr.c \
+satot.c subnetof.c subnettoa.c subnettot.c \
+subnettypeof.c ttoaddr.c ttodata.c ttoprotoport.c ttosa.c ttosubnet.c ttoul.c \
+ultoa.c ultot.c
INCLUDES = \
-I$(top_srcdir)/src/libstrongswan \
@@ -18,3 +19,4 @@ dist_man3_MANS = anyaddr.3 atoaddr.3 atoasr.3 atoul.3 goodmask.3 initaddr.3 init
portof.3 rangetosubnet.3 sameaddr.3 subnetof.3 \
ttoaddr.3 ttodata.3 ttosa.3 ttoul.3
+EXTRA_DIST = Android.mk
diff --git a/src/libfreeswan/Makefile.in b/src/libfreeswan/Makefile.in
index d00ae91e0..b6ee06630 100644
--- a/src/libfreeswan/Makefile.in
+++ b/src/libfreeswan/Makefile.in
@@ -204,6 +204,9 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
+attest_plugins = @attest_plugins@
+axis2c_CFLAGS = @axis2c_CFLAGS@
+axis2c_LIBS = @axis2c_LIBS@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -212,6 +215,7 @@ build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
c_plugins = @c_plugins@
+clearsilver_LIBS = @clearsilver_LIBS@
datadir = @datadir@
datarootdir = @datarootdir@
dbusservicedir = @dbusservicedir@
@@ -228,11 +232,13 @@ host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
+imcvdir = @imcvdir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
ipsecdir = @ipsecdir@
ipsecgroup = @ipsecgroup@
+ipseclibdir = @ipseclibdir@
ipsecuser = @ipsecuser@
libcharon_plugins = @libcharon_plugins@
libdir = @libdir@
@@ -276,6 +282,7 @@ sharedstatedir = @sharedstatedir@
soup_CFLAGS = @soup_CFLAGS@
soup_LIBS = @soup_LIBS@
srcdir = @srcdir@
+starter_plugins = @starter_plugins@
strongswan_conf = @strongswan_conf@
sysconfdir = @sysconfdir@
systemdsystemunitdir = @systemdsystemunitdir@
@@ -287,15 +294,16 @@ urandom_device = @urandom_device@
xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
noinst_LIBRARIES = libfreeswan.a
-libfreeswan_a_SOURCES = addrtoa.c addrtot.c addrtypeof.c anyaddr.c atoaddr.c atoasr.c \
- atosubnet.c atoul.c copyright.c datatot.c freeswan.h \
- goodmask.c initaddr.c initsaid.c initsubnet.c internal.h ipsec_param.h \
- pfkey_v2_build.c pfkey_v2_debug.c \
- pfkey_v2_ext_bits.c pfkey_v2_parse.c portof.c rangetoa.c \
- pfkey.h pfkeyv2.h rangetosubnet.c sameaddr.c \
- satot.c subnetof.c subnettoa.c subnettot.c \
- subnettypeof.c ttoaddr.c ttodata.c ttoprotoport.c ttosa.c ttosubnet.c ttoul.c \
- ultoa.c ultot.c
+libfreeswan_a_SOURCES = \
+addrtoa.c addrtot.c addrtypeof.c anyaddr.c atoaddr.c atoasr.c \
+atosubnet.c atoul.c copyright.c datatot.c freeswan.h \
+goodmask.c initaddr.c initsaid.c initsubnet.c internal.h ipsec_param.h \
+pfkey_v2_build.c pfkey_v2_debug.c \
+pfkey_v2_ext_bits.c pfkey_v2_parse.c portof.c rangetoa.c \
+pfkey.h pfkeyv2.h rangetosubnet.c sameaddr.c \
+satot.c subnetof.c subnettoa.c subnettot.c \
+subnettypeof.c ttoaddr.c ttodata.c ttoprotoport.c ttosa.c ttosubnet.c ttoul.c \
+ultoa.c ultot.c
INCLUDES = \
-I$(top_srcdir)/src/libstrongswan \
@@ -306,6 +314,7 @@ dist_man3_MANS = anyaddr.3 atoaddr.3 atoasr.3 atoul.3 goodmask.3 initaddr.3 init
portof.3 rangetosubnet.3 sameaddr.3 subnetof.3 \
ttoaddr.3 ttodata.3 ttosa.3 ttoul.3
+EXTRA_DIST = Android.mk
all: all-am
.SUFFIXES:
diff --git a/src/libfreeswan/datatot.c b/src/libfreeswan/datatot.c
index 3e2aed76d..e3b9d6417 100644
--- a/src/libfreeswan/datatot.c
+++ b/src/libfreeswan/datatot.c
@@ -58,7 +58,6 @@ size_t dstlen;
prefix = "0x";
break;
case ':':
- format = 'x';
breakevery = 2;
breakchar = ':';
/* FALLTHROUGH */
diff --git a/src/libfreeswan/pfkey_v2_parse.c b/src/libfreeswan/pfkey_v2_parse.c
index a143003b3..8fec9d119 100644
--- a/src/libfreeswan/pfkey_v2_parse.c
+++ b/src/libfreeswan/pfkey_v2_parse.c
@@ -40,11 +40,11 @@ char pfkey_v2_parse_c_version[] = "";
#define SENDERR(_x) do { error = -(_x); goto errlab; } while (0)
-struct satype_tbl {
+static struct {
uint8_t proto;
uint8_t satype;
char* name;
-} static satype_tbl[] = {
+} satype_tbl[] = {
{ SA_ESP, SADB_SATYPE_ESP, "ESP" },
{ SA_AH, SADB_SATYPE_AH, "AH" },
{ SA_IPIP, SADB_X_SATYPE_IPIP, "IPIP" },