WPS UPnP: Fix UPnP initialization for non-bridge case with some drivers
If the driver wrapper is setting up the interface up only at commit(), UPnP initialization fails. Fix that by moving UPnP setup to happen after the driver commit() call.
This commit is contained in:
parent
fa5165586f
commit
86795546f7
3 changed files with 39 additions and 8 deletions
|
@ -784,6 +784,17 @@ int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* WPS UPnP module can be initialized only when the "upnp_iface" is up.
|
||||
* If "interface" and "upnp_iface" are the same (e.g., non-bridge
|
||||
* mode), the interface is up only after driver_commit, so initialize
|
||||
* WPS after driver_commit.
|
||||
*/
|
||||
for (j = 0; j < iface->num_bss; j++) {
|
||||
if (hostapd_init_wps_complete(iface->bss[j]))
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (hapd->setup_complete_cb)
|
||||
hapd->setup_complete_cb(hapd->setup_complete_cb_ctx);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue