mesh: Fix struct hostapd_data initialization
The local custom version of allocating and initializing struct hostapd_data within wpa_supplicant_mesh_init() is problematic. This has already missed couple of initialization steps that are required. Instead of trying to remember to keep this up to date, use hostapd_alloc_bss_data() so that there is only one place for this initialization. This is fixing a recent issue where FILS HLP started using hapd->dhcp_server and expected that to be initialized to -1. For the mesh case, that did not happen and when removing the interface, the FILS HLP implementation ended up unregistering eloop socket for hapd->dhcp_server (= 0). This could result in missing socket callbacks for an arbitrary socket. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
9b170991ac
commit
db5e53cb06
2 changed files with 3 additions and 3 deletions
|
@ -2004,7 +2004,8 @@ hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
|
|||
hapd->iconf = conf;
|
||||
hapd->conf = bss;
|
||||
hapd->iface = hapd_iface;
|
||||
hapd->driver = hapd->iconf->driver;
|
||||
if (conf)
|
||||
hapd->driver = conf->driver;
|
||||
hapd->ctrl_sock = -1;
|
||||
dl_list_init(&hapd->ctrl_dst);
|
||||
dl_list_init(&hapd->nr_db);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue