make sending of IETF Assessment Result attributes configurable

This commit is contained in:
Andreas Steffen
2012-09-09 23:24:23 +02:00
parent 6f93927b6c
commit a785bb8797
3 changed files with 14 additions and 10 deletions
+12 -10
View File
@@ -734,18 +734,20 @@ METHOD(imv_agent_t, provide_recommendation, TNC_Result,
} }
} }
/* Send and IETF Assessment Result attribute */ /* Send an IETF Assessment Result attribute if enabled */
attr = ietf_attr_assess_result_create(eval); if (lib->settings->get_bool(lib->settings, "libimcv.assessment_result", TRUE))
attr_list = linked_list_create();
attr_list->insert_last(attr_list, attr);
result = send_message(this, connection_id, FALSE, this->id, dst_imc_id,
attr_list);
attr_list->destroy(attr_list);
if (result != TNC_RESULT_SUCCESS)
{ {
return result; attr = ietf_attr_assess_result_create(eval);
attr_list = linked_list_create();
attr_list->insert_last(attr_list, attr);
result = send_message(this, connection_id, FALSE, this->id, dst_imc_id,
attr_list);
attr_list->destroy(attr_list);
if (result != TNC_RESULT_SUCCESS)
{
return result;
}
} }
return this->provide_recommendation(this->id, connection_id, rec, eval); return this->provide_recommendation(this->id, connection_id, rec, eval);
} }
@@ -2,6 +2,7 @@
libimcv { libimcv {
debug_level = 3 debug_level = 3
assessment_result = no
plugins { plugins {
imv-scanner { imv-scanner {
closed_port_policy = no closed_port_policy = no
@@ -2,6 +2,7 @@
libimcv { libimcv {
debug_level = 3 debug_level = 3
assessment_result = no
plugins { plugins {
imv-test { imv-test {
rounds = 1 rounds = 1