]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
restrict PA-TNC message siz only if upper limit is defined
authorAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 12 Jul 2012 20:18:24 +0000 (22:18 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 12 Jul 2012 20:18:24 +0000 (22:18 +0200)
src/libimcv/pa_tnc/pa_tnc_msg.c

index 63ad94e9da5e57f0a548ada47a9c0f48703b6479..19ea55fe738c7c73d0a202714a8eb9ade8bcf1d2 100644 (file)
@@ -121,7 +121,7 @@ METHOD(pa_tnc_msg_t, add_attribute, bool,
        attr_value = attr->get_value(attr);
        attr_len = PA_TNC_ATTR_HEADER_SIZE + attr_value.len;
 
-       if (this->msg_len + attr_len > this->max_msg_len)
+       if (this->max_msg_len && this->msg_len + attr_len > this->max_msg_len)
        {
                /* attribute just does not fit into this message */
                return FALSE;