]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Set NL80211_ATTR_IFACE_SOCKET_OWNER for connect and associate
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 13 Jan 2017 10:01:20 +0000 (12:01 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 13 Jan 2017 13:05:26 +0000 (15:05 +0200)
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 <jouni@qca.qualcomm.com>
src/drivers/driver_nl80211.c

index 2d00823198c8ef0af1a55a488c115e71251822e6..dab23864c96642c68b01853573ff4e55ab3e58e7 100644 (file)
@@ -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));