]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Make local UUID available through ctrl_iface STATUS command
authorJouni Malinen <j@w1.fi>
Sat, 28 Dec 2013 17:44:49 +0000 (19:44 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 29 Dec 2013 08:00:32 +0000 (10:00 +0200)
Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/ctrl_iface.c

index bb3f5e262e8ce38152947d4754f5c984c62fa598..c6287ec87105d4c29f22930f09ce1b847bcf2ffc 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "utils/common.h"
 #include "utils/eloop.h"
+#include "utils/uuid.h"
 #include "common/version.h"
 #include "common/ieee802_11_defs.h"
 #include "common/ieee802_11_common.h"
@@ -1629,6 +1630,17 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
        if (res >= 0)
                pos += res;
 
+#ifdef CONFIG_WPS
+       {
+               char uuid_str[100];
+               uuid_bin2str(wpa_s->wps->uuid, uuid_str, sizeof(uuid_str));
+               ret = os_snprintf(pos, end - pos, "uuid=%s\n", uuid_str);
+               if (ret < 0 || ret >= end - pos)
+                       return pos - buf;
+               pos += ret;
+       }
+#endif /* CONFIG_WPS */
+
 #ifdef ANDROID
        wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_STATE_CHANGE
                     "id=%d state=%d BSSID=" MACSTR " SSID=%s",