[RESEND] dbus: expose availability of FT on D-Bus

Message ID 20181007145710.55500-1-lkundrak@v3.sk
State Accepted
Headers show
Series
  • [RESEND] dbus: expose availability of FT on D-Bus
Related show

Commit Message

Lubomir Rintel Oct. 7, 2018, 2:57 p.m.
This lets us know whether we can attempt to use FT-PSK, FT-EAP,
FT-EAP-SHA384, FT-FILS-SHA256 or FT-FILS-SHA384.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 wpa_supplicant/dbus/dbus_new_handlers.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Dan Williams Oct. 16, 2018, 5:26 p.m. | #1
On Sun, 2018-10-07 at 16:57 +0200, Lubomir Rintel wrote:
> This lets us know whether we can attempt to use FT-PSK, FT-EAP,
> FT-EAP-SHA384, FT-FILS-SHA256 or FT-FILS-SHA384.

LGTM

> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
>  wpa_supplicant/dbus/dbus_new_handlers.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c
> b/wpa_supplicant/dbus/dbus_new_handlers.c
> index c81c0855d..fa461c357 100644
> --- a/wpa_supplicant/dbus/dbus_new_handlers.c
> +++ b/wpa_supplicant/dbus/dbus_new_handlers.c
> @@ -980,8 +980,8 @@ 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[8] = { NULL, NULL, NULL, NULL,
> NULL, NULL,
> -					NULL, NULL };
> +	const char *capabilities[9] = { NULL, NULL, NULL, NULL,
> NULL, NULL,
> +					NULL, NULL, NULL };
>  	size_t num_items = 0;
>  #ifdef CONFIG_FILS
>  	struct wpa_global *global = user_data;
> @@ -1020,6 +1020,9 @@ dbus_bool_t
> wpas_dbus_getter_global_capabilities(
>  	if (fils_sk_pfs_supported)
>  		capabilities[num_items++] = "fils_sk_pfs";
>  #endif /* CONFIG_FILS */
> +#ifdef CONFIG_IEEE80211R
> +	capabilities[num_items++] = "ft";
> +#endif /* CONFIG_IEEE80211R */
>  
>  	return wpas_dbus_simple_array_property_getter(iter,
>  						      DBUS_TYPE_STRI
> NG,
Jouni Malinen Nov. 24, 2018, 5:20 p.m. | #2
On Sun, Oct 07, 2018 at 04:57:10PM +0200, Lubomir Rintel wrote:
> This lets us know whether we can attempt to use FT-PSK, FT-EAP,
> FT-EAP-SHA384, FT-FILS-SHA256 or FT-FILS-SHA384.

Thanks, applied.

Patch

diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index c81c0855d..fa461c357 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -980,8 +980,8 @@  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[8] = { NULL, NULL, NULL, NULL, NULL, NULL,
-					NULL, NULL };
+	const char *capabilities[9] = { NULL, NULL, NULL, NULL, NULL, NULL,
+					NULL, NULL, NULL };
 	size_t num_items = 0;
 #ifdef CONFIG_FILS
 	struct wpa_global *global = user_data;
@@ -1020,6 +1020,9 @@  dbus_bool_t wpas_dbus_getter_global_capabilities(
 	if (fils_sk_pfs_supported)
 		capabilities[num_items++] = "fils_sk_pfs";
 #endif /* CONFIG_FILS */
+#ifdef CONFIG_IEEE80211R
+	capabilities[num_items++] = "ft";
+#endif /* CONFIG_IEEE80211R */
 
 	return wpas_dbus_simple_array_property_getter(iter,
 						      DBUS_TYPE_STRING,