]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FT: Fix Authorized flag setting for FT protocol
authorJouni Malinen <j@w1.fi>
Sat, 13 Mar 2010 19:43:00 +0000 (21:43 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 13 Mar 2010 19:43:00 +0000 (21:43 +0200)
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.

src/ap/ap_drv_ops.c
src/ap/ieee802_11.c

index a5978c6f4980234f50ed2b4ef6fde56a2e0acc99..7a62d73cb812290648906131d7af19839239ae0f 100644 (file)
@@ -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;
index b6ac50b25d57d3dc42f42387de0ced2557bffb78..6f16a2c1b4397ee93a4c1187fe8c1eb122f73881 100644 (file)
@@ -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));