summaryrefslogtreecommitdiff
path: root/src/libtnccs/plugins/tnccs_11
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtnccs/plugins/tnccs_11')
-rw-r--r--src/libtnccs/plugins/tnccs_11/Makefile.am2
-rw-r--r--src/libtnccs/plugins/tnccs_11/Makefile.in8
-rw-r--r--src/libtnccs/plugins/tnccs_11/messages/tnccs_error_msg.c5
-rw-r--r--src/libtnccs/plugins/tnccs_11/messages/tnccs_msg.c6
4 files changed, 12 insertions, 9 deletions
diff --git a/src/libtnccs/plugins/tnccs_11/Makefile.am b/src/libtnccs/plugins/tnccs_11/Makefile.am
index cbe0b8e19..fc22c46ff 100644
--- a/src/libtnccs/plugins/tnccs_11/Makefile.am
+++ b/src/libtnccs/plugins/tnccs_11/Makefile.am
@@ -6,7 +6,7 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
${xml_CFLAGS} \
- -rdynamic
+ $(PLUGIN_CFLAGS)
libstrongswan_tnccs_11_la_LIBADD = ${xml_LIBS}
diff --git a/src/libtnccs/plugins/tnccs_11/Makefile.in b/src/libtnccs/plugins/tnccs_11/Makefile.in
index 182d1ddce..92f3b087a 100644
--- a/src/libtnccs/plugins/tnccs_11/Makefile.in
+++ b/src/libtnccs/plugins/tnccs_11/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.13.3 from Makefile.am.
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
@@ -278,6 +278,7 @@ NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -296,6 +297,7 @@ PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+PLUGIN_CFLAGS = @PLUGIN_CFLAGS@
PTHREADLIB = @PTHREADLIB@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
@@ -323,6 +325,7 @@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+aikgen_plugins = @aikgen_plugins@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -414,6 +417,7 @@ srcdir = @srcdir@
starter_plugins = @starter_plugins@
strongswan_conf = @strongswan_conf@
strongswan_options = @strongswan_options@
+swanctldir = @swanctldir@
sysconfdir = @sysconfdir@
systemdsystemunitdir = @systemdsystemunitdir@
t_plugins = @t_plugins@
@@ -432,7 +436,7 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
${xml_CFLAGS} \
- -rdynamic
+ $(PLUGIN_CFLAGS)
libstrongswan_tnccs_11_la_LIBADD = ${xml_LIBS} $(am__append_1)
@MONOLITHIC_TRUE@noinst_LTLIBRARIES = libstrongswan-tnccs-11.la
diff --git a/src/libtnccs/plugins/tnccs_11/messages/tnccs_error_msg.c b/src/libtnccs/plugins/tnccs_11/messages/tnccs_error_msg.c
index 86b7c6aa5..26a6c032f 100644
--- a/src/libtnccs/plugins/tnccs_11/messages/tnccs_error_msg.c
+++ b/src/libtnccs/plugins/tnccs_11/messages/tnccs_error_msg.c
@@ -128,9 +128,8 @@ tnccs_msg_t *tnccs_error_msg_create_from_node(xmlNodePtr node)
error_type_name = xmlGetProp(node, "type");
if (error_type_name)
{
- this->error_type = enum_from_name(tnccs_error_type_names,
- error_type_name);
- if (this->error_type == -1)
+ if (!enum_from_name(tnccs_error_type_names, error_type_name,
+ &this->error_type))
{
this->error_type = TNCCS_ERROR_OTHER;
}
diff --git a/src/libtnccs/plugins/tnccs_11/messages/tnccs_msg.c b/src/libtnccs/plugins/tnccs_11/messages/tnccs_msg.c
index fa5ce8239..e3736560d 100644
--- a/src/libtnccs/plugins/tnccs_11/messages/tnccs_msg.c
+++ b/src/libtnccs/plugins/tnccs_11/messages/tnccs_msg.c
@@ -41,7 +41,7 @@ tnccs_msg_t* tnccs_msg_create_from_node(xmlNodePtr node, linked_list_t *errors)
char *error_msg, buf[BUF_LEN];
tnccs_error_type_t error_type = TNCCS_ERROR_MALFORMED_BATCH;
tnccs_msg_t *msg;
- tnccs_msg_type_t type = IMC_IMV_MSG;
+ tnccs_msg_type_t type = IMC_IMV_MSG, nametype;
if (streq((char*)node->name, "IMC-IMV-Message"))
{
@@ -103,7 +103,8 @@ tnccs_msg_t* tnccs_msg_create_from_node(xmlNodePtr node, linked_list_t *errors)
error_msg = "node is not in the TNCCS message namespace";
goto fatal;
}
- if (type != enum_from_name(tnccs_msg_type_names, (char*)cur->name))
+ if (!enum_from_name(tnccs_msg_type_names, cur->name, &nametype) ||
+ type != nametype)
{
error_msg = buf;
snprintf(buf, BUF_LEN, "expected '%N' node but was '%s'",
@@ -137,4 +138,3 @@ fatal:
errors->insert_last(errors, msg);
return NULL;
}
-