Revert "Do prune_association only after the STA is authorized"
Commit e978072baa
("Do prune_association only after the STA is
authorized") causes issues when an STA roams from one interface to
another interface on the same PHY. The mt7915 driver is not able to
handle this properly. While the commits fixes a DoS, there are other
devices and drivers with the same limitation, so revert to the orginal
behavior for now, until we have a better solution in place.
Ref: https://github.com/openwrt/openwrt/issues/13156
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
parent
125fb92ea5
commit
0c5dcf5fe4
2 changed files with 11 additions and 6 deletions
|
@ -4055,6 +4055,8 @@ int hostapd_remove_iface(struct hapd_interfaces *interfaces, char *buf)
|
|||
void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
|
||||
int reassoc)
|
||||
{
|
||||
int mld_assoc_link_id = -1;
|
||||
|
||||
if (hapd->tkip_countermeasures) {
|
||||
hostapd_drv_sta_deauth(hapd, sta->addr,
|
||||
WLAN_REASON_MICHAEL_MIC_FAILURE);
|
||||
|
@ -4062,10 +4064,16 @@ void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
}
|
||||
|
||||
#ifdef CONFIG_IEEE80211BE
|
||||
if (ap_sta_is_mld(hapd, sta) &&
|
||||
sta->mld_assoc_link_id != hapd->mld_link_id)
|
||||
return;
|
||||
if (ap_sta_is_mld(hapd, sta)) {
|
||||
if (sta->mld_assoc_link_id == hapd->mld_link_id) {
|
||||
mld_assoc_link_id = sta->mld_assoc_link_id;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211BE */
|
||||
if (mld_assoc_link_id != -2)
|
||||
hostapd_prune_associations(hapd, sta->addr, mld_assoc_link_id);
|
||||
|
||||
ap_sta_clear_disconnect_timeouts(hapd, sta);
|
||||
sta->post_csa_sa_query = 0;
|
||||
|
|
|
@ -1485,9 +1485,6 @@ bool ap_sta_set_authorized_flag(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
mld_assoc_link_id = -2;
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211BE */
|
||||
if (mld_assoc_link_id != -2)
|
||||
hostapd_prune_associations(hapd, sta->addr,
|
||||
mld_assoc_link_id);
|
||||
sta->flags |= WLAN_STA_AUTHORIZED;
|
||||
} else {
|
||||
sta->flags &= ~WLAN_STA_AUTHORIZED;
|
||||
|
|
Loading…
Add table
Reference in a new issue