From 818fe7c02454ae6e123e6ddf1d08d5303a121e16 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Sun, 3 Feb 2013 18:52:03 +0100 Subject: [PATCH] send an error attribute if vendor ID or type of received attribute is reserved --- src/libimcv/pa_tnc/pa_tnc_msg.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/libimcv/pa_tnc/pa_tnc_msg.c b/src/libimcv/pa_tnc/pa_tnc_msg.c index 63445f3a1..d3aceee06 100644 --- a/src/libimcv/pa_tnc/pa_tnc_msg.c +++ b/src/libimcv/pa_tnc/pa_tnc_msg.c @@ -284,6 +284,18 @@ METHOD(pa_tnc_msg_t, process, status_t, } DBG3(DBG_TNC, "%B", &value); + if (vendor_id == PEN_RESERVED) + { + error = ietf_attr_pa_tnc_error_create_with_offset(error_code, + this->encoding, offset + 1); + goto err; + } + if (type == IETF_ATTR_RESERVED) + { + error = ietf_attr_pa_tnc_error_create_with_offset(error_code, + this->encoding, offset + 4); + goto err; + } attr = imcv_pa_tnc_attributes->create(imcv_pa_tnc_attributes, vendor_id, type, value); if (!attr)