From c85dfc6f84626e292d90b04a5d1350ca02b281fc Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 13 Jan 2017 12:01:20 +0200 Subject: [PATCH] nl80211: Set NL80211_ATTR_IFACE_SOCKET_OWNER for connect and associate This allows kernel to force disconnection if something kills the wpa_supplicant process in a manner that does not allow proper cleanup to be performed. The association is not supposed to be allowed to continue after process has ended since there are number of operations that wpa_supplicant may need to do during the association. Signed-off-by: Jouni Malinen --- src/drivers/driver_nl80211.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 2d0082319..dab23864c 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -5057,6 +5057,9 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv, struct wpa_driver_associate_params *params, struct nl_msg *msg) { + if (nla_put_flag(msg, NL80211_ATTR_IFACE_SOCKET_OWNER)) + return -1; + if (params->bssid) { wpa_printf(MSG_DEBUG, " * bssid=" MACSTR, MAC2STR(params->bssid));