diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2013-02-03 18:52:03 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2013-02-03 18:52:03 +0100 |
commit | 818fe7c02454ae6e123e6ddf1d08d5303a121e16 (patch) | |
tree | 18f1387cc7f09057070953f2bf6654b671852482 /src | |
parent | a3a190b7bdc3cc8740fd7f1e6ac9d78ff2c0f528 (diff) | |
download | strongswan-818fe7c02454ae6e123e6ddf1d08d5303a121e16.tar.bz2 strongswan-818fe7c02454ae6e123e6ddf1d08d5303a121e16.tar.xz |
send an error attribute if vendor ID or type of received attribute is reserved
Diffstat (limited to 'src')
-rw-r--r-- | src/libimcv/pa_tnc/pa_tnc_msg.c | 12 |
1 files changed, 12 insertions, 0 deletions
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) |