summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2024-02-23 16:58:51 +0100
committerMichael Brown2024-02-23 17:17:07 +0100
commit834f319f87bd2a1135c51375774f6bfe17a244cc (patch)
tree27213dcee478d26165a52fd048c635ddd102131f
parent[efi] Ignore new LoongArch PC-relative relocations and relaxations (diff)
downloadipxe-834f319f87bd2a1135c51375774f6bfe17a244cc.tar.gz
ipxe-834f319f87bd2a1135c51375774f6bfe17a244cc.tar.xz
ipxe-834f319f87bd2a1135c51375774f6bfe17a244cc.zip
[eap] Add progress debug messages
Add debug messages for each EAP Request and Response, and to show the list of methods offered when sending a Nak. Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/net/eap.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/net/eap.c b/src/net/eap.c
index 79b060aa..696b7fe9 100644
--- a/src/net/eap.c
+++ b/src/net/eap.c
@@ -65,6 +65,8 @@ static int eap_tx_response ( struct eap_supplicant *supplicant,
msg->hdr.len = htons ( len );
msg->type = supplicant->type;
memcpy ( msg->data, rsp, rsp_len );
+ DBGC ( netdev, "EAP %s Response id %#02x type %d\n",
+ netdev->name, msg->hdr.id, msg->type );
/* Transmit response */
if ( ( rc = supplicant->tx ( supplicant, msg, len ) ) != 0 ) {
@@ -86,18 +88,24 @@ static int eap_tx_response ( struct eap_supplicant *supplicant,
* @ret rc Return status code
*/
static int eap_tx_nak ( struct eap_supplicant *supplicant ) {
+ struct net_device *netdev = supplicant->netdev;
unsigned int max = table_num_entries ( EAP_METHODS );
uint8_t methods[ max + 1 /* potential EAP_TYPE_NONE */ ];
unsigned int count = 0;
struct eap_method *method;
/* Populate methods list */
+ DBGC ( netdev, "EAP %s Nak offering types {", netdev->name );
for_each_table_entry ( method, EAP_METHODS ) {
- if ( method->type > EAP_TYPE_NAK )
+ if ( method->type > EAP_TYPE_NAK ) {
+ DBGC ( netdev, "%s%d",
+ ( count ? ", " : "" ), method->type );
methods[count++] = method->type;
+ }
}
if ( ! count )
methods[count++] = EAP_TYPE_NONE;
+ DBGC ( netdev, "}\n" );
assert ( count <= max );
/* Transmit response */
@@ -269,6 +277,8 @@ static int eap_rx_request ( struct eap_supplicant *supplicant,
/* Record request details */
supplicant->id = msg->hdr.id;
supplicant->type = msg->type;
+ DBGC ( netdev, "EAP %s Request id %#02x type %d\n",
+ netdev->name, msg->hdr.id, msg->type );
/* Handle according to type */
for_each_table_entry ( method, EAP_METHODS ) {