Properly send empty EAP-TLS messages
This commit is contained in:
@@ -215,6 +215,8 @@ static eap_payload_t *read_buf(private_eap_tls_t *this, u_int8_t identifier)
|
|||||||
pkt->type = EAP_TLS;
|
pkt->type = EAP_TLS;
|
||||||
pkt->flags = 0;
|
pkt->flags = 0;
|
||||||
|
|
||||||
|
if (this->output.len)
|
||||||
|
{
|
||||||
start = (char*)(pkt + 1);
|
start = (char*)(pkt + 1);
|
||||||
if (this->outpos == 0)
|
if (this->outpos == 0)
|
||||||
{ /* first fragment */
|
{ /* first fragment */
|
||||||
@@ -239,6 +241,7 @@ static eap_payload_t *read_buf(private_eap_tls_t *this, u_int8_t identifier)
|
|||||||
chunk_free(&this->output);
|
chunk_free(&this->output);
|
||||||
this->outpos = 0;
|
this->outpos = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
htoun16(&pkt->length, pkt_len);
|
htoun16(&pkt->length, pkt_len);
|
||||||
return eap_payload_create_data(chunk_create(buf, pkt_len));
|
return eap_payload_create_data(chunk_create(buf, pkt_len));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user