summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bird <david@coova.com>2012-10-25 09:20:15 +0300
committerJouni Malinen <j@w1.fi>2012-10-25 09:20:15 +0300
commitf826635c2d4951113e87e4fd89f13ec3c39ab6fa (patch)
tree0338a02e33b7ff1895e8416c054cc57b95343b05
parentf3989ced4fc3f16ba3724a2360cd61b793168cb4 (diff)
downloadhostap-f826635c2d4951113e87e4fd89f13ec3c39ab6fa.tar.gz
Fix EAPOL processing when STA switches between multi-BSSes
There was an issue with EAPOL frame exchanges in a multi-BSS configuration when a station switches between the BSSes controlled by the same hostapd process. When processing the EAPOL packet, the array of virtual APs (iface->bss) is searched looking for the station that sent the packet in order to identify which signal context should be used during processing. The first match of the station in its list gets used in the ieee802_1x_receive() function. However, even after a station has disassociated, it remains in the list of stations pending an inactivity timeout. This leads to the wrong hapd context (one where the station had already disassociated) being used in some cases (if the current/active bss entry appears in the list after one where the station has just disassociated from) for EAPOL processing. Fix this by checking the WLAN_STA_ASSOC flag before assuming the right hapd context was found for the given station. Signed-hostap: David Bird <dbird@powercloudsystems.com> intended-for: hostap-1
-rw-r--r--src/ap/drv_callbacks.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 23fa241ac..5517294f0 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -672,12 +672,15 @@ static void hostapd_event_eapol_rx(struct hostapd_data *hapd, const u8 *src,
const u8 *data, size_t data_len)
{
struct hostapd_iface *iface = hapd->iface;
+ struct sta_info *sta;
size_t j;
for (j = 0; j < iface->num_bss; j++) {
- if (ap_get_sta(iface->bss[j], src)) {
- hapd = iface->bss[j];
- break;
+ if ((sta = ap_get_sta(iface->bss[j], src))) {
+ if (sta->flags & WLAN_STA_ASSOC) {
+ hapd = iface->bss[j];
+ break;
+ }
}
}