wpa_supplicant: clean up hostapd control socket on exit to fix socket leak in ap...
authorFelix Fietkau <nbd@openwrt.org>
Mon, 2 Dec 2013 13:08:11 +0000 (13:08 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 2 Dec 2013 13:08:11 +0000 (13:08 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 38985

package/network/services/hostapd/patches/370-ap_sta_support.patch

index 95bde3f659b1dfb69a36cdfe7b0374c4a420e6dc..a3d05727eb3fbd1ebd367c43520d58bc15d7641d 100644 (file)
        /* 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 @@