Fix 4addr reassociation-without-deauthentication on AP
Data connection was lost if a station reassociated without the STA entry being cleaned up on the AP side. Fix this by moving reconfiguration of the STA WDS parameters in association response callback to happen only after the STA flags have been updated to associated stated. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
8c0ed37b64
commit
cb2b666670
1 changed files with 13 additions and 10 deletions
|
@ -3232,16 +3232,6 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
|
|||
sta->sa_query_timed_out = 0;
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
|
||||
if (sta->flags & WLAN_STA_WDS) {
|
||||
int ret;
|
||||
char ifname_wds[IFNAMSIZ + 1];
|
||||
|
||||
ret = hostapd_set_wds_sta(hapd, ifname_wds, sta->addr,
|
||||
sta->aid, 1);
|
||||
if (!ret)
|
||||
hostapd_set_wds_encryption(hapd, sta, ifname_wds);
|
||||
}
|
||||
|
||||
if (sta->eapol_sm == NULL) {
|
||||
/*
|
||||
* This STA does not use RADIUS server for EAP authentication,
|
||||
|
@ -3258,6 +3248,19 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
|
|||
|
||||
hostapd_set_sta_flags(hapd, sta);
|
||||
|
||||
if (sta->flags & WLAN_STA_WDS) {
|
||||
int ret;
|
||||
char ifname_wds[IFNAMSIZ + 1];
|
||||
|
||||
wpa_printf(MSG_DEBUG, "Reenable 4-address WDS mode for STA "
|
||||
MACSTR " (aid %u)",
|
||||
MAC2STR(sta->addr), sta->aid);
|
||||
ret = hostapd_set_wds_sta(hapd, ifname_wds, sta->addr,
|
||||
sta->aid, 1);
|
||||
if (!ret)
|
||||
hostapd_set_wds_encryption(hapd, sta, ifname_wds);
|
||||
}
|
||||
|
||||
if (sta->auth_alg == WLAN_AUTH_FT)
|
||||
wpa_auth_sm_event(sta->wpa_sm, WPA_ASSOC_FT);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue