--- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -975,6 +975,12 @@ static int wpa_supplicant_ctrl_iface_tdl u8 peer[ETH_ALEN]; int ret; + if (wpa_s->wpa_state != WPA_COMPLETED || wpa_s->current_ssid == NULL) { + wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_SETUP : ignoring request " + "not associated!"); + return -ENOTCONN; + } + if (hwaddr_aton(addr, peer)) { wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_DISCOVER: invalid " "address '%s'", addr); @@ -999,6 +1005,12 @@ static int wpa_supplicant_ctrl_iface_tdl u8 peer[ETH_ALEN]; int ret; + if (wpa_s->wpa_state != WPA_COMPLETED || wpa_s->current_ssid == NULL) { + wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_SETUP : ignoring request " + "not associated!"); + return -ENOTCONN; + } + if (hwaddr_aton(addr, peer)) { wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_SETUP: invalid " "address '%s'", addr);