]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
send an error attribute if vendor ID or type of received attribute is reserved
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 3 Feb 2013 17:52:03 +0000 (18:52 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 3 Feb 2013 17:52:03 +0000 (18:52 +0100)
src/libimcv/pa_tnc/pa_tnc_msg.c

index 63445f3a10d9c3774e934edf38bbc14538254770..d3aceee06a45017374a1f79254b1cb359e30e175 100644 (file)
@@ -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)