static upper size limit for PA-TNC messages

This commit is contained in:
Andreas Steffen
2012-07-12 21:26:18 +02:00
parent 8d98f7fef6
commit ea67a75b98
27 changed files with 251 additions and 68 deletions
@@ -192,6 +192,10 @@ METHOD(pa_tnc_attr_t, build, void,
{
bio_writer_t *writer;
if (this->value.ptr)
{
return;
}
writer = bio_writer_create(PA_ERROR_HEADER_SIZE + PA_ERROR_MSG_INFO_SIZE);
writer->write_uint8 (writer, PA_ERROR_RESERVED);
writer->write_uint24(writer, this->error_vendor_id);
+4
View File
@@ -125,6 +125,10 @@ METHOD(pa_tnc_attr_t, build, void,
enumerator_t *enumerator;
port_entry_t *entry;
if (this->value.ptr)
{
return;
}
writer = bio_writer_create(this->ports->get_count(this->ports) *
PORT_FILTER_ENTRY_SIZE);
@@ -122,6 +122,10 @@ METHOD(pa_tnc_attr_t, build, void,
bio_writer_t *writer;
chunk_t product_name;
if (this->value.ptr)
{
return;
}
product_name = chunk_create(this->product_name, strlen(this->product_name));
writer = bio_writer_create(PRODUCT_INFO_MIN_SIZE);