[eap] Ignore any received EAP responses

EAP responses (including our own) may be broadcast by switches but are
not of interest to us and can be safely ignored if received.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/118/head
Michael Brown 2024-01-10 15:28:59 +00:00
parent 4ed7a5718f
commit 0abb3e85e5
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,9 @@ struct eap_header {
/** EAP request */
#define EAP_CODE_REQUEST 1
/** EAP response */
#define EAP_CODE_RESPONSE 2
/** EAP request */
struct eap_request {
/** Header */

View File

@ -149,6 +149,9 @@ int eap_rx ( struct eap_supplicant *supplicant, const void *data,
switch ( eap->hdr.code ) {
case EAP_CODE_REQUEST:
return eap_rx_request ( supplicant, &eap->req, len );
case EAP_CODE_RESPONSE:
DBGC2 ( netdev, "EAP %s ignoring response\n", netdev->name );
return 0;
case EAP_CODE_SUCCESS:
return eap_rx_success ( supplicant );
case EAP_CODE_FAILURE: