]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix deinit path to unregister nl_mgmt socket
authorJouni Malinen <j@w1.fi>
Sat, 24 Aug 2013 20:45:11 +0000 (23:45 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 24 Aug 2013 20:45:11 +0000 (23:45 +0300)
Commit 8e12685c43546d03ced5ec5dc4b56486a1204115 replaced call to
nl80211_mgmt_unsubscribe() on the deinit path with a
wpa_driver_nl80211_set_mode() call. This is not enough to unregister the
bss->nl_mgmt read socket in all cases. Fix this by unconditionally
unsubscribing from the nl80211 events after having change mode to
station.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/drivers/driver_nl80211.c

index 2865d22e47fe0139f79adce2e9a11388640a8143..0937c633c8dd186d556dc2394ad5ed2b5c2f9b9d 100644 (file)
@@ -4169,6 +4169,7 @@ static void wpa_driver_nl80211_deinit(struct i802_bss *bss)
        (void) i802_set_iface_flags(bss, 0);
        if (drv->nlmode != NL80211_IFTYPE_P2P_DEVICE) {
                wpa_driver_nl80211_set_mode(bss, NL80211_IFTYPE_STATION);
+               nl80211_mgmt_unsubscribe(bss, "deinit");
        } else {
                nl80211_mgmt_unsubscribe(bss, "deinit");
                nl80211_del_p2pdev(bss);