aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers.c
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2018-02-04 01:50:37 (GMT)
committerJouni Malinen <j@w1.fi>2018-04-02 08:56:06 (GMT)
commite4802127650aafd187c7e4790360e6970135de3f (patch)
tree0cba1404d8fff46cc0e1a6463eca9ec1373991a7 /wpa_supplicant/dbus/dbus_new_handlers.c
parent208263c014e4258faa0812027bdd2fb03bd610b5 (diff)
downloadhostap-e4802127650aafd187c7e4790360e6970135de3f.zip
hostap-e4802127650aafd187c7e4790360e6970135de3f.tar.gz
hostap-e4802127650aafd187c7e4790360e6970135de3f.tar.bz2
dbus: Add FILS to global capabilities
If any of the interfaces supports FILS (and similarly for FILS-SK-PFS), include the "fils" (and "fils_sk_pfs") capability in D-Bus information. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index f4ebabe..a3c98fa 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -980,8 +980,21 @@ dbus_bool_t wpas_dbus_getter_global_capabilities(
const struct wpa_dbus_property_desc *property_desc,
DBusMessageIter *iter, DBusError *error, void *user_data)
{
- const char *capabilities[6] = { NULL, NULL, NULL, NULL, NULL, NULL };
+ const char *capabilities[8] = { NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL };
size_t num_items = 0;
+#ifdef CONFIG_FILS
+ struct wpa_global *global = user_data;
+ struct wpa_supplicant *wpa_s;
+ int fils_supported = 0, fils_sk_pfs_supported = 0;
+
+ for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) {
+ if (wpa_is_fils_supported(wpa_s))
+ fils_supported = 1;
+ if (wpa_is_fils_sk_pfs_supported(wpa_s))
+ fils_sk_pfs_supported = 1;
+ }
+#endif /* CONFIG_FILS */
#ifdef CONFIG_AP
capabilities[num_items++] = "ap";
@@ -1001,6 +1014,12 @@ dbus_bool_t wpas_dbus_getter_global_capabilities(
#ifdef CONFIG_MESH
capabilities[num_items++] = "mesh";
#endif /* CONFIG_MESH */
+#ifdef CONFIG_FILS
+ if (fils_supported)
+ capabilities[num_items++] = "fils";
+ if (fils_sk_pfs_supported)
+ capabilities[num_items++] = "fils_sk_pfs";
+#endif /* CONFIG_FILS */
return wpas_dbus_simple_array_property_getter(iter,
DBUS_TYPE_STRING,