]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
IBSS RSN: Do not start 4-way handshake unless RSN is enabled
authorJouni Malinen <j@w1.fi>
Sun, 5 Dec 2010 02:17:05 +0000 (18:17 -0800)
committerJouni Malinen <j@w1.fi>
Sun, 5 Dec 2010 02:17:05 +0000 (18:17 -0800)
wpa_supplicant/events.c

index 51cd116ea2954099dfb2abad6c33bbf0c87f94d1..988c31ac8a89b7e279e70a9d2b821540d74218a6 100644 (file)
@@ -1568,8 +1568,15 @@ wpa_supplicant_event_ft_response(struct wpa_supplicant *wpa_s,
 static void wpa_supplicant_event_ibss_rsn_start(struct wpa_supplicant *wpa_s,
                                                union wpa_event_data *data)
 {
+       struct wpa_ssid *ssid;
        if (data == NULL)
                return;
+       ssid = wpa_s->current_ssid;
+       if (ssid == NULL)
+               return;
+       if (ssid->mode != WPAS_MODE_IBSS || !wpa_key_mgmt_wpa(ssid->key_mgmt))
+               return;
+
        ibss_rsn_start(wpa_s->ibss_rsn, data->ibss_rsn_start.peer);
 }
 #endif /* CONFIG_IBSS_RSN */