method_eap: Add EAP Success/Failure support

Although, EapHost takes care for EAP Success and Failure packets for us,
it does so for the outer-most method only. When using EAP inside a TLS
tunnel, we are responsible for EAP Success and Failure packets ourselves.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
2020-01-20 16:00:37 +01:00
parent e5e5f1c63e
commit 9d0e261bbe
3 changed files with 47 additions and 22 deletions

View File

@@ -358,7 +358,7 @@ DWORD APIENTRY EapPeerProcessRequestPacket(
*ppEapError = NULL;
// Parameter check
if (!hSession || !pReceivedPacket || dwReceivedPacketSize < 6 || pReceivedPacket->Data[0] != EAPMETHOD_TYPE || !pEapOutput)
if (!hSession || !pReceivedPacket || dwReceivedPacketSize < sizeof(EapPacket) || pReceivedPacket->Data[0] != EAPMETHOD_TYPE || !pEapOutput)
return dwResult = ERROR_INVALID_PARAMETER;
try {