From 2136f480202cc55dd10ab0f196a84028415a8da3 Mon Sep 17 00:00:00 2001 From: Masashi Honma Date: Fri, 17 Dec 2010 13:55:13 +0200 Subject: [PATCH] nl80211: Stop driver init sooner if the interface does not exist --- src/drivers/driver_nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 0258d35cf..a3852249d 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -1927,7 +1927,8 @@ wpa_driver_nl80211_finish_drv_init(struct wpa_driver_nl80211_data *drv) 1, IF_OPER_DORMANT); #endif /* HOSTAPD */ - linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, drv->addr); + if (linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, drv->addr)) + return -1; if (nl80211_register_action_frames(drv) < 0) { wpa_printf(MSG_DEBUG, "nl80211: Failed to register Action "