wpa_supplicant: clean up hostapd control socket on exit to fix socket leak in ap+sta mode on wifi restarts

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38985
lede-17.01
Felix Fietkau 2013-12-02 13:08:11 +00:00
parent 6960ae4e65
commit 9381eaccb3
1 changed files with 12 additions and 0 deletions

View File

@ -126,6 +126,18 @@
/* RSNA Supplicant Key Management - INITIALIZE */
eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE);
eapol_sm_notify_portValid(wpa_s->eapol, FALSE);
@@ -3125,6 +3183,11 @@ static void wpa_supplicant_deinit_iface(
if (terminate)
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
+ if (wpa_s->hostapd) {
+ wpa_ctrl_close(wpa_s->hostapd);
+ wpa_s->hostapd = NULL;
+ }
+
if (wpa_s->ctrl_iface) {
wpa_supplicant_ctrl_iface_deinit(wpa_s->ctrl_iface);
wpa_s->ctrl_iface = NULL;
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -11,6 +11,7 @@