hostapd: Clear interface_added flag on error path
If more BSSes are added in config file than are supported by the driver, segmentation fault can appear. For this case, the interface_added flag needs to be cleared if adding a new BSS fails. Signed-hostap: Marek Kwaczynski <marek.kwaczynski@tieto.com>
This commit is contained in:
parent
075131e32e
commit
493ba877c3
1 changed files with 1 additions and 0 deletions
|
@ -667,6 +667,7 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
|
||||||
NULL, first == -1)) {
|
NULL, first == -1)) {
|
||||||
wpa_printf(MSG_ERROR, "Failed to add BSS (BSSID="
|
wpa_printf(MSG_ERROR, "Failed to add BSS (BSSID="
|
||||||
MACSTR ")", MAC2STR(hapd->own_addr));
|
MACSTR ")", MAC2STR(hapd->own_addr));
|
||||||
|
hapd->interface_added = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue