SAE: Indicate used group in ctrl_iface STATUS
authorJouni Malinen <j@w1.fi>
Tue, 1 Jan 2013 14:33:25 +0000 (16:33 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 12 Jan 2013 15:51:53 +0000 (17:51 +0200)
The new "sae_group=<id>" line will be included in the ctrl_iface STATUS
output if SAE was used for the association.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/ctrl_iface.c

index 864dd7d..0dad5c7 100644 (file)
@@ -1373,6 +1373,16 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
 #endif /* CONFIG_AP */
                pos += wpa_sm_get_status(wpa_s->wpa, pos, end - pos, verbose);
        }
+#ifdef CONFIG_SAE
+       if (wpa_s->wpa_state >= WPA_ASSOCIATED &&
+           wpa_s->sme.sae.state == SAE_ACCEPTED && !wpa_s->ap_iface) {
+               ret = os_snprintf(pos, end - pos, "sae_group=%d\n",
+                                 wpa_s->sme.sae.group);
+               if (ret < 0 || ret >= end - pos)
+                       return pos - buf;
+               pos += ret;
+       }
+#endif /* CONFIG_SAE */
        ret = os_snprintf(pos, end - pos, "wpa_state=%s\n",
                          wpa_supplicant_state_txt(wpa_s->wpa_state));
        if (ret < 0 || ret >= end - pos)