From: Andreas Steffen Date: Tue, 16 Nov 2010 21:43:48 +0000 (+0100) Subject: get_attribute() and set_attribute() are not allowed to use TNC_CONNECTIONID_ANY X-Git-Tag: 4.5.1~504 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66c30fa24441d64eb55df977caa94aba2fbde828;p=thirdparty%2Fstrongswan.git get_attribute() and set_attribute() are not allowed to use TNC_CONNECTIONID_ANY --- diff --git a/src/libcharon/tnc/tnccs/tnccs_manager.c b/src/libcharon/tnc/tnccs/tnccs_manager.c index c1ba452e97..14c648025b 100644 --- a/src/libcharon/tnc/tnccs/tnccs_manager.c +++ b/src/libcharon/tnc/tnccs/tnccs_manager.c @@ -308,7 +308,8 @@ METHOD(tnccs_manager_t, get_attribute, TNC_Result, tnccs_connection_entry_t *entry; recommendations_t *recs = NULL; - if (attribute_id != TNC_ATTRIBUTEID_PREFERRED_LANGUAGE) + if (id == TNC_CONNECTIONID_ANY || + attribute_id != TNC_ATTRIBUTEID_PREFERRED_LANGUAGE) { return TNC_RESULT_INVALID_PARAMETER; } @@ -356,8 +357,9 @@ METHOD(tnccs_manager_t, set_attribute, TNC_Result, tnccs_connection_entry_t *entry; recommendations_t *recs = NULL; - if (attribute_id != TNC_ATTRIBUTEID_REASON_STRING && - attribute_id != TNC_ATTRIBUTEID_REASON_LANGUAGE) + if (id == TNC_CONNECTIONID_ANY || + (attribute_id != TNC_ATTRIBUTEID_REASON_STRING && + attribute_id != TNC_ATTRIBUTEID_REASON_LANGUAGE)) { return TNC_RESULT_INVALID_PARAMETER; }