From: Andreas Steffen Date: Mon, 21 Oct 2013 19:03:53 +0000 (+0200) Subject: check it specified IF-TNCCS protocol is enabled X-Git-Tag: 5.1.1rc1~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=27bf5c06dcaeee6d42b15d48ef4a0127a3d23f49;p=thirdparty%2Fstrongswan.git check it specified IF-TNCCS protocol is enabled --- diff --git a/src/libcharon/plugins/eap_tnc/eap_tnc.c b/src/libcharon/plugins/eap_tnc/eap_tnc.c index cf4044f202..f9ab742588 100644 --- a/src/libcharon/plugins/eap_tnc/eap_tnc.c +++ b/src/libcharon/plugins/eap_tnc/eap_tnc.c @@ -298,6 +298,12 @@ static eap_tnc_t *eap_tnc_create(identification_t *server, tnccs = tnc->tnccs->create_instance(tnc->tnccs, type, is_server, server, peer, TNC_IFT_EAP_1_1, is_server ? enforce_recommendation : NULL); + if (!tnccs) + { + DBG1(DBG_TNC, "TNCCS protocol '%s' not enabled", protocol); + free(this); + return NULL; + } this->tnccs = tnccs->get_ref(tnccs); this->tls_eap = tls_eap_create(EAP_TNC, &tnccs->tls, EAP_TNC_MAX_MESSAGE_LEN,