diff options
author | Michael Brown <mcb30@ipxe.org> | 2024-01-10 15:28:59 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2024-01-10 16:02:32 +0000 |
commit | 0abb3e85e518c4d9366d4555093c0aff0c060858 (patch) | |
tree | ca712109d5828b8653476207eb4628dcdb236772 /src | |
parent | 4ed7a5718f29e59c19d6bef51dc3430861c9da87 (diff) | |
download | ipxe-0abb3e85e518c4d9366d4555093c0aff0c060858.zip ipxe-0abb3e85e518c4d9366d4555093c0aff0c060858.tar.gz ipxe-0abb3e85e518c4d9366d4555093c0aff0c060858.tar.bz2 |
[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>
Diffstat (limited to 'src')
-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 818862a..4b689cc 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 2c68b75..8ba87e2 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: |