aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-13 19:43:00 (GMT)
committerJouni Malinen <j@w1.fi>2010-03-13 19:43:00 (GMT)
commitef580012d16e980011210f37aae2e50380feecf9 (patch)
tree4e9f5d144f49a3827e12e97cfee436fb6cebd564 /src/ap
parent5d5a9f00214c91584921187912b74af87e2911b9 (diff)
downloadhostap-ef580012d16e980011210f37aae2e50380feecf9.zip
hostap-ef580012d16e980011210f37aae2e50380feecf9.tar.gz
hostap-ef580012d16e980011210f37aae2e50380feecf9.tar.bz2
FT: Fix Authorized flag setting for FT protocol
4-way handshake or EAPOL is not used in this case, so we must force Authorized flag to be set at the conclusion of successful FT protocol run.
Diffstat (limited to 'src/ap')
-rw-r--r--src/ap/ap_drv_ops.c6
-rw-r--r--src/ap/ieee802_11.c10
2 files changed, 11 insertions, 5 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index a5978c6..7a62d73 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -1,6 +1,6 @@
/*
* hostapd - Driver operations
- * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -16,6 +16,7 @@
#include "utils/common.h"
#include "drivers/driver.h"
+#include "common/ieee802_11_defs.h"
#include "hostapd.h"
#include "ieee802_11.h"
#include "sta_info.h"
@@ -121,7 +122,8 @@ static int hostapd_set_sta_flags(struct hostapd_data *hapd,
int set_flags, total_flags, flags_and, flags_or;
total_flags = hostapd_sta_flags_to_drv(sta->flags);
set_flags = WPA_STA_SHORT_PREAMBLE | WPA_STA_WMM | WPA_STA_MFP;
- if (!hapd->conf->ieee802_1x && !hapd->conf->wpa &&
+ if (((!hapd->conf->ieee802_1x && !hapd->conf->wpa) ||
+ sta->auth_alg == WLAN_AUTH_FT) &&
sta->flags & WLAN_STA_AUTHORIZED)
set_flags |= WPA_STA_AUTHORIZED;
flags_or = total_flags & set_flags;
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index b6ac50b..6f16a2c 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1,6 +1,6 @@
/*
* hostapd / IEEE 802.11 Management
- * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2002-2010, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -1522,8 +1522,12 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
if (sta->flags & WLAN_STA_ASSOC)
new_assoc = 0;
sta->flags |= WLAN_STA_ASSOC;
- if (!hapd->conf->ieee802_1x && !hapd->conf->wpa) {
- /* Open or static WEP; no separate authorization */
+ if ((!hapd->conf->ieee802_1x && !hapd->conf->wpa) ||
+ sta->auth_alg == WLAN_AUTH_FT) {
+ /*
+ * Open, static WEP, or FT protocol; no separate authorization
+ * step.
+ */
sta->flags |= WLAN_STA_AUTHORIZED;
wpa_msg(hapd->msg_ctx, MSG_INFO,
AP_STA_CONNECTED MACSTR, MAC2STR(sta->addr));