mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
BSD: Only down the interface once we are sure we can work with it
Signed-off-by: Roy Marples <roy@marples.name>
This commit is contained in:
parent
192964ddc3
commit
7f46ad9ee5
@ -1542,11 +1542,7 @@ wpa_driver_bsd_init(void *ctx, const char *ifname, void *priv)
|
|||||||
|
|
||||||
drv->ctx = ctx;
|
drv->ctx = ctx;
|
||||||
drv->global = priv;
|
drv->global = priv;
|
||||||
|
|
||||||
os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
|
os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
|
||||||
/* Down interface during setup. */
|
|
||||||
if (bsd_ctrl_iface(drv, 0) < 0)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
if (!GETPARAM(drv, IEEE80211_IOC_ROAMING, drv->prev_roaming)) {
|
if (!GETPARAM(drv, IEEE80211_IOC_ROAMING, drv->prev_roaming)) {
|
||||||
wpa_printf(MSG_DEBUG, "%s: failed to get roaming state: %s",
|
wpa_printf(MSG_DEBUG, "%s: failed to get roaming state: %s",
|
||||||
@ -1567,6 +1563,10 @@ wpa_driver_bsd_init(void *ctx, const char *ifname, void *priv)
|
|||||||
if (wpa_driver_bsd_capa(drv))
|
if (wpa_driver_bsd_capa(drv))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
/* Down interface during setup. */
|
||||||
|
if (bsd_ctrl_iface(drv, 0) < 0)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
drv->opmode = get80211opmode(drv);
|
drv->opmode = get80211opmode(drv);
|
||||||
dl_list_add(&drv->global->ifaces, &drv->list);
|
dl_list_add(&drv->global->ifaces, &drv->list);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user