From patchwork Sun Dec 3 15:04:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaap Keuter X-Patchwork-Id: 1871053 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mPn1pw/D; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=xs4all.nl header.i=@xs4all.nl header.a=rsa-sha256 header.s=xs4all01 header.b=cN1X8pR9; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sjr1b0XDVz23n4 for ; Mon, 4 Dec 2023 02:14:26 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ckcOTSt3peRmHLaYlTln2ZxZgHhmdaXDqFd6rQw2K9s=; b=mPn1pw/Dp4BtVY bPgZR/6nFcQk4dPoJEB3LsRWhqVgbYnDb2zz9iJb0nDUuC1z+8UZLYZdMm/K/u8jpIjbFZYvOx3/d FxgPnPb+hLKuaoxGGaijBbjDtRpAkBgsLJe7WWUIsGBvxmyO1ZYq7PNbvHaq+hcYZoAYLUXZvX24E lJJD3NFu+JCZ3+AFKYzjxDF5kshYk0gda6xiuFZ6a+Kb2cv2X40P98kW4LOBTgKv01rcBu1oKoKaj Uesj6gUK4WWUbxsFEJq8/A6IXaNDURiKogjgtmzVPDZQ4cppvbtOuy+pchG/adAFXU1c+AgGHA0FO fsCZgb3gubL61+U5Kcew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r9oA8-000dWe-2v; Sun, 03 Dec 2023 15:13:40 +0000 Received: from ewsoutbound.kpnmail.nl ([195.121.94.185]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r9oA4-000dRD-0L for hostap@lists.infradead.org; Sun, 03 Dec 2023 15:13:39 +0000 X-KPN-MessageId: 7d5cd726-91ee-11ee-abd3-005056999439 Received: from smtp.kpnmail.nl (unknown [10.31.155.8]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id 7d5cd726-91ee-11ee-abd3-005056999439; Sun, 03 Dec 2023 16:13:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=xs4all01; h=mime-version:message-id:date:subject:to:from; bh=XOOfRdX0bST7POor5RX6LS8Fc69LHIWpgjNDnLtgOtI=; b=cN1X8pR9sxSUt0pf0kEBRe1z6Rw0QjkVbOPwFabTTyWHSzSnCk0u2hCCz4rCrYXHE93Q4v71xTY0d 3j4oXCZ/nGUcZYm6raeJph2XRC90GzlKeIMT0O/ktNHMptCTBx98THfiErOFidkhFuwQc3PFQw04nl RDtnJq3wxb5M11ayl012noJQY5OqDCTVIDCDdCrFfPxyQhMptpKrOWYjE2DYg5CWT0i81L4I+tRUNq wWi57DgQqRKEW7Mci7dH3cVNEKvNlf/MbBC39Cg8Pm5kAj36bMBDTzqiEcPbrvzOAgreU6/c50bUNx e7VmFBpw44SyxbD4jHR23m8axm4gjzQ== X-KPN-MID: 33|Cs0XgDfIW1OClBULHtCiugAzHwPi6A8ckvpxtXFeVvOz+9T8LkDmu+wUlOEqXTN mZkLSgwst0W3BuRz8OxDGmj89eNT1CLIN4/vW+s5JGgo= X-KPN-VerifiedSender: Yes X-CMASSUN: 33|OkdlZb1LqvtD1YL6Qql6PsSk4zl2WbnT0hsW/RZtBK5tRIv5XEVBGOoj6ZsXdqB A5F+swv9+L4PuODPOXjPH8g== X-Originating-IP: 77.174.51.77 Received: from neptune.fritz.box (77-174-51-77.fixed.kpn.net [77.174.51.77]) by smtp.xs4all.nl (Halon) with ESMTPSA id 8184461a-91ee-11ee-acaa-00505699d6e5; Sun, 03 Dec 2023 16:13:30 +0100 (CET) From: Jaap Keuter To: hostap@lists.infradead.org Cc: Jaap Keuter Subject: [PATCH] KaY: make debug output consistent Date: Sun, 3 Dec 2023 16:04:28 +0100 Message-ID: <20231203151311.3273250-1-jaap.keuter@xs4all.nl> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231203_071336_604184_B6842FB7 X-CRM114-Status: GOOD ( 10.41 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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(-) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [195.121.94.185 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5) [195.121.94.185 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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; }