From 0a314004ceef70f649fa4819341219ac8f1a05cc Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 24 Aug 2016 21:32:16 -0500 Subject: [PATCH] eap: expanded methods start packets at opcode Expanded EAP methods should get their packets for handling starting at the op-code field. They're not really interested in type/vendor-id/vendor-type fields. --- src/eap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/eap.c b/src/eap.c index 557ae2f8..040201c8 100644 --- a/src/eap.c +++ b/src/eap.c @@ -188,12 +188,19 @@ static void eap_handle_request(struct eap_state *eap, goto unsupported_method; } + if (type != EAP_TYPE_EXPANDED) { + eap->method->handle_request(eap, pkt + 1, len - 1); + return; + } + /* * TODO: Handle Expanded Nak if our vendor-id / vendor-types * don't match */ - eap->method->handle_request(eap, pkt + 1, len - 1); + if (len < 8) + return; + eap->method->handle_request(eap, pkt + 8, len - 8); return; }