delete station from kmod before reusing it

The AC is supposed to react to WiFi Authorization requests
with Add Station messages. Such an Add Station will fail
with the station is already present in the data path.

A Authorization request for a station that the WTP already
in authorized state means that the station lost its assoziation
without the WTP detecting that. So, clearing it from the data
path seems to be appropriate.
This commit is contained in:
Andreas Schultz 2016-04-05 13:06:00 +02:00
parent bb684e92ea
commit 146939a716
1 changed files with 2 additions and 0 deletions

View File

@ -308,6 +308,8 @@ static struct wifi_station* wifi_station_create(struct wifi_wlan* wlan, const ui
/* */
station = wifi_station_get(NULL, address);
if (station) {
wtp_kmod_del_station(wlan->radioid, address);
if (station->wlan && (station->wlan != wlan)) {
log_printf(LOG_INFO, "Roaming station: %s", buffer);
wifi_wlan_deauthentication_station(station->wlan, station, IEEE80211_REASON_PREV_AUTH_NOT_VALID, 1);