diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-09-09 23:24:23 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2012-09-09 23:24:23 +0200 |
commit | a785bb8797f89ee068cdc3e01623877ce154a5e1 (patch) | |
tree | 036f0fabca4e1ba54c204fa38597bbcb60c7e824 /src | |
parent | 6f93927b6c6a0094cb81b7c560baf9b15d339ba5 (diff) | |
download | strongswan-a785bb8797f89ee068cdc3e01623877ce154a5e1.tar.bz2 strongswan-a785bb8797f89ee068cdc3e01623877ce154a5e1.tar.xz |
make sending of IETF Assessment Result attributes configurable
Diffstat (limited to 'src')
-rw-r--r-- | src/libimcv/imv/imv_agent.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/libimcv/imv/imv_agent.c b/src/libimcv/imv/imv_agent.c index 1ec5ba002..d09859562 100644 --- a/src/libimcv/imv/imv_agent.c +++ b/src/libimcv/imv/imv_agent.c @@ -734,18 +734,20 @@ METHOD(imv_agent_t, provide_recommendation, TNC_Result, } } - /* Send and IETF Assessment Result attribute */ - 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; + /* Send an IETF Assessment Result attribute if enabled */ + if (lib->settings->get_bool(lib->settings, "libimcv.assessment_result", TRUE)) + { + 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); } |