aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-08-03 17:17:58 (GMT)
committerJouni Malinen <j@w1.fi>2008-08-03 17:17:58 (GMT)
commitbf98f7f3bcf827f5cdcd2179dfcf3b0c55a8cd16 (patch)
tree62aad7eefae59afe0db75031bcd720bcbac040f4 /hostapd/hostapd.c
parent3ff77e070de25ba9c78528906079e54377e61a95 (diff)
downloadhostap-06-bf98f7f3bcf827f5cdcd2179dfcf3b0c55a8cd16.zip
hostap-06-bf98f7f3bcf827f5cdcd2179dfcf3b0c55a8cd16.tar.gz
hostap-06-bf98f7f3bcf827f5cdcd2179dfcf3b0c55a8cd16.tar.bz2
Added support for opportunistic key caching (OKC)
This allows hostapd to share the PMKSA caches internally when multiple BSSes or radios are being controlled by the same hostapd process.
Diffstat (limited to 'hostapd/hostapd.c')
-rw-r--r--hostapd/hostapd.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c
index 6316054..f0437fd 100644
--- a/hostapd/hostapd.c
+++ b/hostapd/hostapd.c
@@ -298,6 +298,7 @@ static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf,
wconf->eapol_version = conf->eapol_version;
wconf->peerkey = conf->peerkey;
wconf->wme_enabled = conf->wme_enabled;
+ wconf->okc = conf->okc;
#ifdef CONFIG_IEEE80211W
wconf->ieee80211w = conf->ieee80211w;
#endif /* CONFIG_IEEE80211W */
@@ -891,6 +892,26 @@ static int hostapd_wpa_auth_for_each_sta(
}
+static int hostapd_wpa_auth_for_each_auth(
+ void *ctx, int (*cb)(struct wpa_authenticator *sm, void *ctx),
+ void *cb_ctx)
+{
+ struct hostapd_data *ohapd;
+ size_t i, j;
+ struct hapd_interfaces *interfaces = eloop_get_user_data();
+
+ for (i = 0; i < interfaces->count; i++) {
+ for (j = 0; j < interfaces->iface[i]->num_bss; j++) {
+ ohapd = interfaces->iface[i]->bss[j];
+ if (cb(ohapd->wpa_auth, cb_ctx))
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+
static int hostapd_wpa_auth_send_ether(void *ctx, const u8 *dst, u16 proto,
const u8 *data, size_t data_len)
{
@@ -1095,6 +1116,7 @@ static int hostapd_setup_wpa(struct hostapd_data *hapd)
cb.get_seqnum_igtk = hostapd_wpa_auth_get_seqnum_igtk;
cb.send_eapol = hostapd_wpa_auth_send_eapol;
cb.for_each_sta = hostapd_wpa_auth_for_each_sta;
+ cb.for_each_auth = hostapd_wpa_auth_for_each_auth;
cb.send_ether = hostapd_wpa_auth_send_ether;
#ifdef CONFIG_IEEE80211R
cb.send_ft_action = hostapd_wpa_auth_send_ft_action;