aboutsummaryrefslogtreecommitdiffstats
path: root/src/rsn_supp/pmksa_cache.h
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-11-25 19:27:18 (GMT)
committerJouni Malinen <j@w1.fi>2012-11-25 19:39:19 (GMT)
commit6aaac006af7fd39d618c6546939bed9f0f0cea37 (patch)
treebc7ad393192a3d2e307b9be68ae4973e86792aa3 /src/rsn_supp/pmksa_cache.h
parentb7593d35c1db04756bb74b5b9a2491eb1bca9b65 (diff)
downloadhostap-6aaac006af7fd39d618c6546939bed9f0f0cea37.zip
hostap-6aaac006af7fd39d618c6546939bed9f0f0cea37.tar.gz
hostap-6aaac006af7fd39d618c6546939bed9f0f0cea37.tar.bz2
PMKSA: Make deauthentication due to cache entry removal more granular
Expiry can always trigger a deauthentication, but otherwise, deauthentication should only happen when the *current* cache entry is removed and not being replaced. It should not happen when the current PMK just happens to match the PMK of the entry being removed, since multiple entries can have the same PMK when OKC is used and these entries are often removed at different times. This fixes an issue where eviction of the oldest inactive entry due to adding a newer entry to a full cache caused a deauthentication when the entry being removed had the same PMK as the current entry. Signed-hostap: Dan Williams <dcbw@redhat.com>
Diffstat (limited to 'src/rsn_supp/pmksa_cache.h')
-rw-r--r--src/rsn_supp/pmksa_cache.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/rsn_supp/pmksa_cache.h b/src/rsn_supp/pmksa_cache.h
index 9245aab..f318c52 100644
--- a/src/rsn_supp/pmksa_cache.h
+++ b/src/rsn_supp/pmksa_cache.h
@@ -38,11 +38,17 @@ struct rsn_pmksa_cache_entry {
struct rsn_pmksa_cache;
+enum pmksa_free_reason {
+ PMKSA_FREE,
+ PMKSA_REPLACE,
+ PMKSA_EXPIRE,
+};
+
#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2)
struct rsn_pmksa_cache *
pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
- void *ctx, int replace),
+ void *ctx, enum pmksa_free_reason reason),
void *ctx, struct wpa_sm *sm);
void pmksa_cache_deinit(struct rsn_pmksa_cache *pmksa);
struct rsn_pmksa_cache_entry * pmksa_cache_get(struct rsn_pmksa_cache *pmksa,
@@ -66,7 +72,7 @@ void pmksa_cache_flush(struct rsn_pmksa_cache *pmksa, void *network_ctx);
static inline struct rsn_pmksa_cache *
pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
- void *ctx, int replace),
+ void *ctx, int reason),
void *ctx, struct wpa_sm *sm)
{
return (void *) -1;