hostapd: Reset hapd->interface_add properly
This variable is updated when calling hostapd_if_add(), so it makes sense to do the same thing when calling hostapd_if_remove(). Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
This commit is contained in:
parent
3fbd036ea9
commit
81c4fca100
1 changed files with 8 additions and 4 deletions
|
@ -277,10 +277,14 @@ static void hostapd_free_hapd_data(struct hostapd_data *hapd)
|
|||
|
||||
authsrv_deinit(hapd);
|
||||
|
||||
if (hapd->interface_added &&
|
||||
hostapd_if_remove(hapd, WPA_IF_AP_BSS, hapd->conf->iface)) {
|
||||
wpa_printf(MSG_WARNING, "Failed to remove BSS interface %s",
|
||||
if (hapd->interface_added) {
|
||||
hapd->interface_added = 0;
|
||||
if (hostapd_if_remove(hapd, WPA_IF_AP_BSS, hapd->conf->iface)) {
|
||||
wpa_printf(MSG_WARNING,
|
||||
"Failed to remove BSS interface %s",
|
||||
hapd->conf->iface);
|
||||
hapd->interface_added = 1;
|
||||
}
|
||||
}
|
||||
|
||||
os_free(hapd->probereq_cb);
|
||||
|
|
Loading…
Reference in a new issue