Skip to contentSkip to conversation

handshake: add more debugging around PMKSA caching

PATCH Applied James Prestwood 2 participants 2 messages Jan 6, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 handshake: add more debugging around PMKSA caching

Instead of just printing the PMKSA pointer separate this into two separate debug messages, one for if the PMKSA exists and the other if it does not. In addition print out the MAC of the AP so we have a reference of which PMKSA this is.

---
 src/handshake.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
src/handshake.c +5 -3
index f73f91d1..bee31beb 100644
@@ -1272,10 +1272,12 @@ void handshake_state_cache_pmksa(struct handshake_state *s)
 {
 	struct pmksa *pmksa = handshake_state_steal_pmksa(s);
 
-	l_debug("%p", pmksa);
-
-	if (!pmksa)
+	if (!pmksa) {
+		l_debug("No PMKSA for "MAC, MAC_STR(s->aa));
 		return;
+	}
+
+	l_debug("Caching PMKSA for "MAC, MAC_STR(s->aa));
 
 	if (L_WARN_ON(pmksa_cache_put(pmksa) < 0))
 		l_free(pmksa);
Signature · 1 line
2.34.1
#1 lore raw

Hi James,

Quoted 7 lines · James Prestwood

Instead of just printing the PMKSA pointer separate this into two separate debug messages, one for if the PMKSA exists and the other if it does not. In addition print out the MAC of the AP so we have a reference of which PMKSA this is.

---
  src/handshake.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)

Applied, thanks.

Regards,
-Denis