eliminate message length field in EAP-TNC
This commit is contained in:
@@ -457,7 +457,7 @@ METHOD(tls_t, build, status_t,
|
|||||||
DBG1(DBG_TNC, "sending TNCCS Batch (%d bytes) for Connection ID %u",
|
DBG1(DBG_TNC, "sending TNCCS Batch (%d bytes) for Connection ID %u",
|
||||||
data.len, this->connection_id);
|
data.len, this->connection_id);
|
||||||
DBG3(DBG_TNC, "%.*s", data.len, data.ptr);
|
DBG3(DBG_TNC, "%.*s", data.len, data.ptr);
|
||||||
*msglen = data.len;
|
*msglen = 0;
|
||||||
|
|
||||||
if (data.len > *buflen)
|
if (data.len > *buflen)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -641,7 +641,7 @@ METHOD(tls_t, build, status_t,
|
|||||||
pb_tnc_batch_type_names, batch_type, data.len,
|
pb_tnc_batch_type_names, batch_type, data.len,
|
||||||
this->connection_id);
|
this->connection_id);
|
||||||
DBG3(DBG_TNC, "%B", &data);
|
DBG3(DBG_TNC, "%B", &data);
|
||||||
*msglen = data.len;
|
*msglen = 0;
|
||||||
|
|
||||||
if (data.len > *buflen)
|
if (data.len > *buflen)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -251,11 +251,15 @@ static status_t build_pkt(private_tls_eap_t *this, chunk_t *out)
|
|||||||
}
|
}
|
||||||
kind = "packet";
|
kind = "packet";
|
||||||
}
|
}
|
||||||
else
|
else if (this->type != EAP_TNC)
|
||||||
{
|
{
|
||||||
this->first_fragment = TRUE;
|
this->first_fragment = TRUE;
|
||||||
kind = "final fragment";
|
kind = "final fragment";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
kind = "packet";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return status;
|
return status;
|
||||||
@@ -448,7 +452,7 @@ tls_eap_t *tls_eap_create(eap_type_t type, tls_t *tls, size_t frag_size,
|
|||||||
},
|
},
|
||||||
.type = type,
|
.type = type,
|
||||||
.is_server = tls->is_server(tls),
|
.is_server = tls->is_server(tls),
|
||||||
.first_fragment = TRUE,
|
.first_fragment = (type != EAP_TNC),
|
||||||
.frag_size = frag_size,
|
.frag_size = frag_size,
|
||||||
.max_msg_count = max_msg_count,
|
.max_msg_count = max_msg_count,
|
||||||
.include_length = include_length,
|
.include_length = include_length,
|
||||||
|
|||||||
Reference in New Issue
Block a user