summaryrefslogtreecommitdiff
path: root/src/libtnccs/tnc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtnccs/tnc')
-rw-r--r--src/libtnccs/tnc/imv/imv_recommendations.h10
-rw-r--r--src/libtnccs/tnc/tnc.c14
-rw-r--r--src/libtnccs/tnc/tnccs/tnccs_manager.h2
3 files changed, 14 insertions, 12 deletions
diff --git a/src/libtnccs/tnc/imv/imv_recommendations.h b/src/libtnccs/tnc/imv/imv_recommendations.h
index d694e16ae..e7fe355f7 100644
--- a/src/libtnccs/tnc/imv/imv_recommendations.h
+++ b/src/libtnccs/tnc/imv/imv_recommendations.h
@@ -68,6 +68,11 @@ struct recommendations_t {
TNC_IMV_Evaluation_Result *eval);
/**
+ * Clear all recommendation information
+ */
+ void (*clear_recommendation)(recommendations_t *this);
+
+ /**
* Get the preferred language for remediation messages
*
* @return preferred language
@@ -110,11 +115,6 @@ struct recommendations_t {
enumerator_t* (*create_reason_enumerator)(recommendations_t *this);
/**
- * Clears all reason entries
- */
- void (*clear_reasons)(recommendations_t *this);
-
- /**
* Destroys an imv_t object.
*/
void (*destroy)(recommendations_t *this);
diff --git a/src/libtnccs/tnc/tnc.c b/src/libtnccs/tnc/tnc.c
index 652afc291..7c0ee4132 100644
--- a/src/libtnccs/tnc/tnc.c
+++ b/src/libtnccs/tnc/tnc.c
@@ -57,7 +57,7 @@ void libtnccs_init(void)
INIT(this,
.public = {
},
- );
+ );
tnc = &this->public;
}
@@ -75,6 +75,7 @@ void libtnccs_deinit(void)
static bool load_imcvs_from_config(char *filename, bool is_imc)
{
+ bool success = FALSE;
int fd, line_nr = 0;
chunk_t src, line;
struct stat sb;
@@ -110,7 +111,6 @@ static bool load_imcvs_from_config(char *filename, bool is_imc)
while (fetchline(&src, &line))
{
char *name, *path;
- bool success;
chunk_t token;
line_nr++;
@@ -126,7 +126,7 @@ static bool load_imcvs_from_config(char *filename, bool is_imc)
{
DBG1(DBG_TNC, "line %d: keyword must be followed by a space",
line_nr);
- return FALSE;
+ break;
}
/* only interested in IMCs or IMVs depending on label */
@@ -141,7 +141,7 @@ static bool load_imcvs_from_config(char *filename, bool is_imc)
{
DBG1(DBG_TNC, "line %d: %s name must be set in double quotes",
line_nr, label);
- return FALSE;
+ break;
}
/* copy the IMC/IMV name */
@@ -154,7 +154,7 @@ static bool load_imcvs_from_config(char *filename, bool is_imc)
{
DBG1(DBG_TNC, "line %d: %s path is missing", line_nr, label);
free(name);
- return FALSE;
+ break;
}
if (!extract_token(&token, ' ', &line))
{
@@ -177,12 +177,12 @@ static bool load_imcvs_from_config(char *filename, bool is_imc)
}
if (!success)
{
- return FALSE;
+ break;
}
}
munmap(addr, sb.st_size);
close(fd);
- return TRUE;
+ return success;
}
/**
diff --git a/src/libtnccs/tnc/tnccs/tnccs_manager.h b/src/libtnccs/tnc/tnccs/tnccs_manager.h
index 9ca450468..cbf2dc0e9 100644
--- a/src/libtnccs/tnc/tnccs/tnccs_manager.h
+++ b/src/libtnccs/tnc/tnccs/tnccs_manager.h
@@ -70,6 +70,7 @@ struct tnccs_manager_t {
* @param tnccs TNCCS connection instance
* @param send_message TNCCS callback function
* @param request_handshake_retry pointer to boolean variable
+ * @param max_msg_len maximum PA-TNC message size
* @param recs pointer to IMV recommendation set
* @return assigned connection ID
*/
@@ -77,6 +78,7 @@ struct tnccs_manager_t {
tnccs_type_t type, tnccs_t *tnccs,
tnccs_send_message_t send_message,
bool *request_handshake_retry,
+ u_int32_t max_msg_len,
recommendations_t **recs);
/**