]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[eap] Ignore any received EAP responses
authorMichael Brown <mcb30@ipxe.org>
Wed, 10 Jan 2024 15:28:59 +0000 (15:28 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 10 Jan 2024 16:02:32 +0000 (16:02 +0000)
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>
src/include/ipxe/eap.h
src/net/eap.c

index 818862a945a6e69f8c4948db8b9e9be116c1fda9..4b689cc24df9d2f961b5cae1d4101a237a001dcf 100644 (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 */
index 2c68b75d4197605cbbeae5cd2842683a667f488c..8ba87e292291fdae1f3fb7e93c0ca216b7bb21f5 100644 (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: