diff options
author | Michael Brown | 2024-01-10 16:28:59 +0100 |
---|---|---|
committer | Michael Brown | 2024-01-10 17:02:32 +0100 |
commit | 0abb3e85e518c4d9366d4555093c0aff0c060858 (patch) | |
tree | ca712109d5828b8653476207eb4628dcdb236772 | |
parent | [build] Reduce scope of wildcard .gitignore rules (diff) | |
download | ipxe-0abb3e85e518c4d9366d4555093c0aff0c060858.tar.gz ipxe-0abb3e85e518c4d9366d4555093c0aff0c060858.tar.xz ipxe-0abb3e85e518c4d9366d4555093c0aff0c060858.zip |
[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>
-rw-r--r-- | src/include/ipxe/eap.h | 3 | ||||
-rw-r--r-- | src/net/eap.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/include/ipxe/eap.h b/src/include/ipxe/eap.h index 818862a9..4b689cc2 100644 --- a/src/include/ipxe/eap.h +++ b/src/include/ipxe/eap.h @@ -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 */ diff --git a/src/net/eap.c b/src/net/eap.c index 2c68b75d..8ba87e29 100644 --- a/src/net/eap.c +++ b/src/net/eap.c @@ -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: |