From 37d122c2f16b2f3cde294df77e277570793b0ec3 Mon Sep 17 00:00:00 2001 From: Jaap Keuter Date: Sun, 3 Dec 2023 16:04:28 +0100 Subject: [PATCH] KaY: Make debug output consistent Be consistent in capitalization and peer presentation. Signed-off-by: Jaap Keuter --- src/pae/ieee802_1x_kay.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/pae/ieee802_1x_kay.c b/src/pae/ieee802_1x_kay.c index e206a8afa..ae1b06c50 100644 --- a/src/pae/ieee802_1x_kay.c +++ b/src/pae/ieee802_1x_kay.c @@ -1205,7 +1205,7 @@ ieee802_1x_mka_decode_potential_peer_body( /* My message id is used by other participant */ if (peer_mn > participant->mn && !reset_participant_mi(participant)) - wpa_printf(MSG_DEBUG, "KaY: Could not update mi"); + wpa_printf(MSG_DEBUG, "KaY: Could not update MI"); continue; } } @@ -2526,7 +2526,7 @@ ieee802_1x_participant_send_mkpdu( } if (ieee802_1x_kay_encode_mkpdu(participant, buf)) { - wpa_printf(MSG_ERROR, "KaY: encode mkpdu fail"); + wpa_printf(MSG_ERROR, "KaY: encode MKPDU fail"); return -1; } @@ -2592,9 +2592,7 @@ static void ieee802_1x_participant_timer(void *eloop_ctx, void *timeout_ctx) struct ieee802_1x_kay_peer, list) { if (now > peer->expire) { wpa_printf(MSG_DEBUG, "KaY: Live peer removed"); - wpa_hexdump(MSG_DEBUG, "\tMI: ", peer->mi, - sizeof(peer->mi)); - wpa_printf(MSG_DEBUG, "\tMN: %d", peer->mn); + ieee802_1x_kay_dump_peer(peer); dl_list_for_each_safe(rxsc, pre_rxsc, &participant->rxsc_list, struct receive_sc, list) { @@ -2623,10 +2621,10 @@ static void ieee802_1x_participant_timer(void *eloop_ctx, void *timeout_ctx) if (key_server_removed) { if (!reset_participant_mi(participant)) wpa_printf(MSG_WARNING, - "KaY: Could not update mi on key server removal"); + "KaY: Could not update MI on key server removal"); else wpa_printf(MSG_DEBUG, - "KaY: Update mi on key server removal"); + "KaY: Update MI on key server removal"); } if (lp_changed) { @@ -2670,9 +2668,7 @@ static void ieee802_1x_participant_timer(void *eloop_ctx, void *timeout_ctx) struct ieee802_1x_kay_peer, list) { if (now > peer->expire) { wpa_printf(MSG_DEBUG, "KaY: Potential peer removed"); - wpa_hexdump(MSG_DEBUG, "\tMI: ", peer->mi, - sizeof(peer->mi)); - wpa_printf(MSG_DEBUG, "\tMN: %d", peer->mn); + ieee802_1x_kay_dump_peer(peer); dl_list_del(&peer->list); os_free(peer); } @@ -3373,7 +3369,7 @@ static int ieee802_1x_kay_decode_mkpdu(struct ieee802_1x_kay *kay, "KaY: Discarding Rx MKPDU: decode of parameter set type (%d) failed", MKA_SAK_USE); if (!reset_participant_mi(participant)) - wpa_printf(MSG_DEBUG, "KaY: Could not update mi"); + wpa_printf(MSG_DEBUG, "KaY: Could not update MI"); else wpa_printf(MSG_DEBUG, "KaY: Selected a new random MI: %s", @@ -3587,7 +3583,7 @@ ieee802_1x_kay_init(struct ieee802_1x_kay_ctx *ctx, enum macsec_policy policy, goto error; } - wpa_printf(MSG_DEBUG, "KaY: secy init macsec done"); + wpa_printf(MSG_DEBUG, "KaY: SecY init MACsec done"); /* init CP */ kay->cp = ieee802_1x_cp_sm_init(kay); @@ -3678,7 +3674,7 @@ ieee802_1x_kay_create_mka(struct ieee802_1x_kay *kay, kay->if_name, mode_txt(mode), yes_no(is_authenticator)); if (!kay || !ckn || !cak) { - wpa_printf(MSG_ERROR, "KaY: ckn or cak is null"); + wpa_printf(MSG_ERROR, "KaY: CKN or CAK is null"); return NULL; }