All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] doc: document AKMSuite diagnostic value
@ 2021-03-24 23:05 James Prestwood
  2021-03-24 23:05 ` [PATCH v2 2/4] ie: add ie_akm_suite_to_string James Prestwood
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: James Prestwood @ 2021-03-24 23:05 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

---
 doc/station-diagnostic-api.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/station-diagnostic-api.txt b/doc/station-diagnostic-api.txt
index b5a73b5d..6470fa56 100644
--- a/doc/station-diagnostic-api.txt
+++ b/doc/station-diagnostic-api.txt
@@ -23,6 +23,8 @@ Methods		dict GetDiagnostics()
 
 			Frequency - Frequency of currently connected BSS.
 
+			AKMSuite - The chosen AKM for the current connection.
+
 			RSSI [optional] - The RSSI of the currently connected BSS.
 
 			AverageRSSI [optional] - Average RSSI of currently connected BSS.
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/4] ie: add ie_akm_suite_to_string
  2021-03-24 23:05 [PATCH v2 1/4] doc: document AKMSuite diagnostic value James Prestwood
@ 2021-03-24 23:05 ` James Prestwood
  2021-03-25 15:47   ` Denis Kenzior
  2021-03-24 23:05 ` [PATCH v2 3/4] station: add AKMSuite to GetDiagnostics James Prestwood
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: James Prestwood @ 2021-03-24 23:05 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]

Converts ie_rsn_akm_suite values into strings
---
 src/ie.c | 33 +++++++++++++++++++++++++++++++++
 src/ie.h |  2 ++
 2 files changed, 35 insertions(+)

diff --git a/src/ie.c b/src/ie.c
index 46f7496e..80c6e5e4 100644
--- a/src/ie.c
+++ b/src/ie.c
@@ -2636,3 +2636,36 @@ int ie_build_hs20_indication(uint8_t version, uint8_t *to)
 
 	return 0;
 }
+
+const char *ie_akm_suite_to_string(enum ie_rsn_akm_suite akm)
+{
+	switch (akm) {
+	case IE_RSN_AKM_SUITE_8021X:
+	case IE_RSN_AKM_SUITE_8021X_SHA256:
+		return "WPA2-Enterprise";
+	case IE_RSN_AKM_SUITE_PSK:
+	case IE_RSN_AKM_SUITE_PSK_SHA256:
+		return "WPA2-Personal";
+	case IE_RSN_AKM_SUITE_FT_OVER_8021X:
+	case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
+		return "WPA2-Enterprise + FT";
+	case IE_RSN_AKM_SUITE_FT_USING_PSK:
+		return "WPA2-Personal + FT";
+	case IE_RSN_AKM_SUITE_SAE_SHA256:
+		return "WPA3-Personal";
+	case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256:
+		return "WPA3-Personal + FT";
+	case IE_RSN_AKM_SUITE_OWE:
+		return "OWE";
+	case IE_RSN_AKM_SUITE_FILS_SHA256:
+	case IE_RSN_AKM_SUITE_FILS_SHA384:
+		return "FILS";
+	case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256:
+	case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384:
+		return "FILS + FT";
+	case IE_RSN_AKM_SUITE_OSEN:
+		return "OSEN";
+	default:
+		return NULL;
+	}
+}
diff --git a/src/ie.h b/src/ie.h
index 995f0e4f..bed88de9 100644
--- a/src/ie.h
+++ b/src/ie.h
@@ -528,3 +528,5 @@ int ie_parse_hs20_indication_from_data(const uint8_t *data, size_t len,
 					uint8_t *version, uint16_t *pps_mo_id,
 					uint8_t *domain_id);
 int ie_build_hs20_indication(uint8_t version, uint8_t *to);
+
+const char *ie_akm_suite_to_string(enum ie_rsn_akm_suite suite);
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/4] station: add AKMSuite to GetDiagnostics
  2021-03-24 23:05 [PATCH v2 1/4] doc: document AKMSuite diagnostic value James Prestwood
  2021-03-24 23:05 ` [PATCH v2 2/4] ie: add ie_akm_suite_to_string James Prestwood
@ 2021-03-24 23:05 ` James Prestwood
  2021-03-24 23:05 ` [PATCH v2 4/4] client: add AKMSuite to diagnostics James Prestwood
  2021-03-25 15:45 ` [PATCH v2 1/4] doc: document AKMSuite diagnostic value Denis Kenzior
  3 siblings, 0 replies; 6+ messages in thread
From: James Prestwood @ 2021-03-24 23:05 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]

---
 src/station.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/station.c b/src/station.c
index 8049fd85..2289ab39 100644
--- a/src/station.c
+++ b/src/station.c
@@ -3629,6 +3629,7 @@ static void station_get_diagnostic_cb(
 	struct station *station = user_data;
 	struct l_dbus_message *reply;
 	struct l_dbus_message_builder *builder;
+	struct handshake_state *hs = netdev_get_handshake(station->netdev);
 
 	if (!info) {
 		reply = dbus_error_aborted(station->get_station_pending);
@@ -3645,6 +3646,8 @@ static void station_get_diagnostic_cb(
 					util_address_to_string(info->addr));
 	dbus_append_dict_basic(builder, "Frequency", 'u',
 				&station->connected_bss->frequency);
+	dbus_append_dict_basic(builder, "AKMSuite", 's',
+				ie_akm_suite_to_string(hs->akm_suite));
 
 	diagnostic_info_to_dict(info, builder);
 
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 4/4] client: add AKMSuite to diagnostics
  2021-03-24 23:05 [PATCH v2 1/4] doc: document AKMSuite diagnostic value James Prestwood
  2021-03-24 23:05 ` [PATCH v2 2/4] ie: add ie_akm_suite_to_string James Prestwood
  2021-03-24 23:05 ` [PATCH v2 3/4] station: add AKMSuite to GetDiagnostics James Prestwood
@ 2021-03-24 23:05 ` James Prestwood
  2021-03-25 15:45 ` [PATCH v2 1/4] doc: document AKMSuite diagnostic value Denis Kenzior
  3 siblings, 0 replies; 6+ messages in thread
From: James Prestwood @ 2021-03-24 23:05 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

---
 client/diagnostic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/client/diagnostic.c b/client/diagnostic.c
index 58c646d7..d5ff7738 100644
--- a/client/diagnostic.c
+++ b/client/diagnostic.c
@@ -92,6 +92,7 @@ static const struct diagnostic_dict_mapping diagnostic_mapping[] = {
 	{ "RxMCS", 'y' },
 	{ "TxMCS", 'y' },
 	{ "Frequency", 'u' },
+	{ "AKMSuite", 's' },
 	{ NULL }
 };
 
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/4] doc: document AKMSuite diagnostic value
  2021-03-24 23:05 [PATCH v2 1/4] doc: document AKMSuite diagnostic value James Prestwood
                   ` (2 preceding siblings ...)
  2021-03-24 23:05 ` [PATCH v2 4/4] client: add AKMSuite to diagnostics James Prestwood
@ 2021-03-25 15:45 ` Denis Kenzior
  3 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2021-03-25 15:45 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

Hi James,

On 3/24/21 6:05 PM, James Prestwood wrote:
> ---
>   doc/station-diagnostic-api.txt | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/doc/station-diagnostic-api.txt b/doc/station-diagnostic-api.txt
> index b5a73b5d..6470fa56 100644
> --- a/doc/station-diagnostic-api.txt
> +++ b/doc/station-diagnostic-api.txt
> @@ -23,6 +23,8 @@ Methods		dict GetDiagnostics()
>   
>   			Frequency - Frequency of currently connected BSS.
>   
> +			AKMSuite - The chosen AKM for the current connection.
> +

This doesn't feel right somehow.  I would expect AKMSuite to be something like: 
'00-0F0AC:9 FT over SAE' or something to that effect.  Similar to how iwmon does it.

Since we're going for something more human-palatable, how about just naming this 
'Security' instead.  With possible values being:

WPA-Personal, WPA2-Personal, WPA3-Personal, WPA2-Enterprise, OWE.  With maybe '+ 
FT', '+ FILS' or 'FT/FILS' suffixes and whatever others we feel are important.

>   			RSSI [optional] - The RSSI of the currently connected BSS.
>   
>   			AverageRSSI [optional] - Average RSSI of currently connected BSS.
> 

Regards,
-Denis

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/4] ie: add ie_akm_suite_to_string
  2021-03-24 23:05 ` [PATCH v2 2/4] ie: add ie_akm_suite_to_string James Prestwood
@ 2021-03-25 15:47   ` Denis Kenzior
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2021-03-25 15:47 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]

Hi James,

On 3/24/21 6:05 PM, James Prestwood wrote:
> Converts ie_rsn_akm_suite values into strings
> ---
>   src/ie.c | 33 +++++++++++++++++++++++++++++++++
>   src/ie.h |  2 ++
>   2 files changed, 35 insertions(+)
> 
> diff --git a/src/ie.c b/src/ie.c
> index 46f7496e..80c6e5e4 100644
> --- a/src/ie.c
> +++ b/src/ie.c
> @@ -2636,3 +2636,36 @@ int ie_build_hs20_indication(uint8_t version, uint8_t *to)
>   
>   	return 0;
>   }
> +
> +const char *ie_akm_suite_to_string(enum ie_rsn_akm_suite akm)
> +{
> +	switch (akm) {
> +	case IE_RSN_AKM_SUITE_8021X:

How are you distinguishing between WPA1 and WPA2?

> +	case IE_RSN_AKM_SUITE_8021X_SHA256:
> +		return "WPA2-Enterprise";
> +	case IE_RSN_AKM_SUITE_PSK:
> +	case IE_RSN_AKM_SUITE_PSK_SHA256:
> +		return "WPA2-Personal";
> +	case IE_RSN_AKM_SUITE_FT_OVER_8021X:
> +	case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
> +		return "WPA2-Enterprise + FT";
> +	case IE_RSN_AKM_SUITE_FT_USING_PSK:
> +		return "WPA2-Personal + FT";
> +	case IE_RSN_AKM_SUITE_SAE_SHA256:
> +		return "WPA3-Personal";
> +	case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256:
> +		return "WPA3-Personal + FT";
> +	case IE_RSN_AKM_SUITE_OWE:
> +		return "OWE";
> +	case IE_RSN_AKM_SUITE_FILS_SHA256:
> +	case IE_RSN_AKM_SUITE_FILS_SHA384:
> +		return "FILS";
> +	case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256:
> +	case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384:
> +		return "FILS + FT";
> +	case IE_RSN_AKM_SUITE_OSEN:
> +		return "OSEN";
> +	default:
> +		return NULL;
> +	}
> +}

Also, for reasons mentioned in patch 1, I'd rather keep this specific to the 
diagnostics interface.  So this probably belongs in diagnostics.c ?

Regards,
-Denis

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-25 15:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 23:05 [PATCH v2 1/4] doc: document AKMSuite diagnostic value James Prestwood
2021-03-24 23:05 ` [PATCH v2 2/4] ie: add ie_akm_suite_to_string James Prestwood
2021-03-25 15:47   ` Denis Kenzior
2021-03-24 23:05 ` [PATCH v2 3/4] station: add AKMSuite to GetDiagnostics James Prestwood
2021-03-24 23:05 ` [PATCH v2 4/4] client: add AKMSuite to diagnostics James Prestwood
2021-03-25 15:45 ` [PATCH v2 1/4] doc: document AKMSuite diagnostic value Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.