From patchwork Thu Mar 6 00:19:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 327245 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D46D82C007E for ; Thu, 6 Mar 2014 11:24:21 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 414AD9D3AE; Wed, 5 Mar 2014 19:24:17 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EClPG4uerEnB; Wed, 5 Mar 2014 19:24:16 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id CEF359D3B8; Wed, 5 Mar 2014 19:23:44 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 531DC9D397 for ; Wed, 5 Mar 2014 19:23:43 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hDehLPCsY7xO for ; Wed, 5 Mar 2014 19:23:37 -0500 (EST) Received: from ns3.lanforge.com (mail.candelatech.com [208.74.158.172]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 961449D3BC for ; Wed, 5 Mar 2014 19:23:13 -0500 (EST) Received: from fs3.candelatech.com (firewall.candelatech.com [70.89.124.249]) by ns3.lanforge.com (8.14.2/8.14.2) with ESMTP id s260Lh2f031348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Mar 2014 16:21:45 -0800 From: greearb@candelatech.com To: hostap@lists.shmoo.com Subject: [PATCH 09/15] rsn: Add debug code for pmksa cache. Date: Wed, 5 Mar 2014 16:19:54 -0800 Message-Id: <1394065200-20377-9-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1394065200-20377-1-git-send-email-greearb@candelatech.com> References: <1394065200-20377-1-git-send-email-greearb@candelatech.com> Cc: Ben Greear X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Ben Greear Dodgy radius server was causing failures. This code was added to debug the problem, but was never used as user figured out RADIUS problem first. Signed-hostap: Ben Greear --- src/rsn_supp/pmksa_cache.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/rsn_supp/pmksa_cache.c b/src/rsn_supp/pmksa_cache.c index 0960815..fbf0f96 100644 --- a/src/rsn_supp/pmksa_cache.c +++ b/src/rsn_supp/pmksa_cache.c @@ -321,6 +321,28 @@ struct rsn_pmksa_cache_entry * pmksa_cache_get(struct rsn_pmksa_cache *pmksa, return entry; entry = entry->next; } + +#if 0 + /* Verbose debugging, we failed to find the cache entry, so print out + * everything to figure out why. + */ + wpa_printf(MSG_DEBUG, "RSN: pmksa-cache-get failed lookup, network-ctx: %p", + network_ctx); + if (aa) + wpa_printf(MSG_DEBUG, "RSN: aa: " MACSTR "", MAC2STR(aa)); + if (pmkid) + wpa_hexdump(MSG_DEBUG, "RSN: pmkid", + pmkid, PMKID_LEN); + entry = pmksa->pmksa; + while (entry) { + wpa_printf(MSG_DEBUG, "RSN: entry: %p aa: " MACSTR + " network-ctx: %p", + MAC2STR(entry->aa), entry->network_ctx); + wpa_hexdump(MSG_DEBUG, "RSN: pmkid", + entry->pmkid, PMKID_LEN); + entry = entry->next; + } +#endif return NULL; }