From 6d00ab04302df257cb3092b2b31b4eac42e77569 Mon Sep 17 00:00:00 2001 From: Cedric IZOARD Date: Tue, 8 Jul 2014 09:50:32 +0200 Subject: [PATCH] nl80211: Ensure nl_preq unregistration on driver deinit When driver interface is destroyed (via wpa_driver_nl80211_deinit) the "preq" nl socket isn't always deleted but the callback struct associated is. After the interface is destroyed we may still get event on the socket but as the callback has been freed this will cause wpa_supplicant to crash. This patch ensures that the "preq" socket is destroyed when destroying the interface. Signed-off-by: Cedric IZOARD --- src/drivers/driver_nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 4d5da9495..683123b10 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -10566,7 +10566,7 @@ static int wpa_driver_nl80211_probe_req_report(struct i802_bss *bss, int report) if (!report) { if (bss->nl_preq && drv->device_ap_sme && - is_ap_interface(drv->nlmode)) { + is_ap_interface(drv->nlmode) && !bss->in_deinit) { /* * Do not disable Probe Request reporting that was * enabled in nl80211_setup_ap().