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.
This commit is contained in:
Jouni Malinen 2010-03-13 21:43:00 +02:00
parent 5d5a9f0021
commit ef580012d1
2 changed files with 11 additions and 5 deletions

View file

@ -1,6 +1,6 @@
/* /*
* hostapd - Driver operations * 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 * 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 * it under the terms of the GNU General Public License version 2 as
@ -16,6 +16,7 @@
#include "utils/common.h" #include "utils/common.h"
#include "drivers/driver.h" #include "drivers/driver.h"
#include "common/ieee802_11_defs.h"
#include "hostapd.h" #include "hostapd.h"
#include "ieee802_11.h" #include "ieee802_11.h"
#include "sta_info.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; int set_flags, total_flags, flags_and, flags_or;
total_flags = hostapd_sta_flags_to_drv(sta->flags); total_flags = hostapd_sta_flags_to_drv(sta->flags);
set_flags = WPA_STA_SHORT_PREAMBLE | WPA_STA_WMM | WPA_STA_MFP; 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) sta->flags & WLAN_STA_AUTHORIZED)
set_flags |= WPA_STA_AUTHORIZED; set_flags |= WPA_STA_AUTHORIZED;
flags_or = total_flags & set_flags; flags_or = total_flags & set_flags;

View file

@ -1,6 +1,6 @@
/* /*
* hostapd / IEEE 802.11 Management * 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 * 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 * 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) if (sta->flags & WLAN_STA_ASSOC)
new_assoc = 0; new_assoc = 0;
sta->flags |= WLAN_STA_ASSOC; sta->flags |= WLAN_STA_ASSOC;
if (!hapd->conf->ieee802_1x && !hapd->conf->wpa) { if ((!hapd->conf->ieee802_1x && !hapd->conf->wpa) ||
/* Open or static WEP; no separate authorization */ sta->auth_alg == WLAN_AUTH_FT) {
/*
* Open, static WEP, or FT protocol; no separate authorization
* step.
*/
sta->flags |= WLAN_STA_AUTHORIZED; sta->flags |= WLAN_STA_AUTHORIZED;
wpa_msg(hapd->msg_ctx, MSG_INFO, wpa_msg(hapd->msg_ctx, MSG_INFO,
AP_STA_CONNECTED MACSTR, MAC2STR(sta->addr)); AP_STA_CONNECTED MACSTR, MAC2STR(sta->addr));