connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Daniel Wagner <wagi@monom.org>
To: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Cc: connman@lists.linux.dev, iwd@lists.01.org,
	Sven.Dembianny@bshg.com, marcel@holtmann.org
Subject: Re: [RFC connman v1 1/1] gsupplicant: Add support for WPA3-Personal transition mode
Date: Thu, 5 Aug 2021 08:07:50 +0200	[thread overview]
Message-ID: <20210805060750.kbrvx5uouuq37egk@beryllium.lan> (raw)
In-Reply-To: <20210804212315.265376-2-ariel.dalessandro@collabora.com>

[adding the new mailing list]

On Wed, Aug 04, 2021 at 06:23:15PM -0300, Ariel D'Alessandro wrote:
> This commit adds support for WPA3-Personal transition mode, which
> supports both WPA2-Personal (PSK) and WPA3-Personal (SAE).
> 
> Based on the AP accepted key management protocols, connman configures
> wpa_supplicant as follows:
> 
> * WPA3-Personal-only mode: key_mgmt="SAE" ; ieee80211w=2
> * WPA3-Personal transition mode: key_mgmt="SAE WPA-PSK" ; ieee80211w=1
> 
> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> ---
>  gsupplicant/supplicant.c | 29 +++++++++++++++++++----------
>  1 file changed, 19 insertions(+), 10 deletions(-)
> 
> diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
> index 58c78fd1..8316f48a 100644
> --- a/gsupplicant/supplicant.c
> +++ b/gsupplicant/supplicant.c
> @@ -4903,17 +4903,16 @@ static void add_network_security_proto(DBusMessageIter *dict,
>  	g_free(proto);
>  }
>  
> -static void add_network_ieee80211w(DBusMessageIter *dict, GSupplicantSSID *ssid)
> +static void add_network_ieee80211w(DBusMessageIter *dict, GSupplicantSSID *ssid,
> +				   GSupplicantMfpOptions ieee80211w)
>  {
> -	if (!(ssid->keymgmt & G_SUPPLICANT_KEYMGMT_SAE))
> -		return;
> -
>  	supplicant_dbus_dict_append_basic(dict, "ieee80211w", DBUS_TYPE_UINT32,
> -					  &ssid->ieee80211w);
> +					  &ieee80211w);
>  }
>  
>  static void add_network_security(DBusMessageIter *dict, GSupplicantSSID *ssid)
>  {
> +	GSupplicantMfpOptions ieee80211w;
>  	char *key_mgmt;
>  
>  	switch (ssid->security) {
> @@ -4929,10 +4928,22 @@ static void add_network_security(DBusMessageIter *dict, GSupplicantSSID *ssid)
>  		add_network_security_ciphers(dict, ssid);
>  		break;
>  	case G_SUPPLICANT_SECURITY_PSK:
> -		if (ssid->keymgmt & G_SUPPLICANT_KEYMGMT_SAE)
> -			key_mgmt = "SAE";
> -		else
> +		if (ssid->keymgmt & G_SUPPLICANT_KEYMGMT_SAE) {
> +			if (ssid->keymgmt & G_SUPPLICANT_KEYMGMT_WPA_PSK) {
> +				/*
> +				 * WPA3-Personal transition mode: supports both
> +				 * WPA2-Personal (PSK) and WPA3-Personal (SAE)
> +				 */
> +				key_mgmt = "SAE WPA-PSK";
> +				ieee80211w = G_SUPPLICANT_MFP_OPTIONAL;
> +			} else {
> +				key_mgmt = "SAE";
> +				ieee80211w = G_SUPPLICANT_MFP_REQUIRED;
> +			}
> +			add_network_ieee80211w(dict, ssid, ieee80211w);
> +		} else {
>  			key_mgmt = "WPA-PSK";
> +		}
>  		add_network_security_psk(dict, ssid);
>  		add_network_security_ciphers(dict, ssid);
>  		add_network_security_proto(dict, ssid);
> @@ -4994,8 +5005,6 @@ static void interface_add_network_params(DBusMessageIter *iter, void *user_data)
>  
>  	add_network_security(&dict, ssid);
>  
> -	add_network_ieee80211w(&dict, ssid);
> -
>  	supplicant_dbus_dict_append_fixed_array(&dict, "ssid",
>  					DBUS_TYPE_BYTE, &ssid->ssid,
>  						ssid->ssid_len);
> -- 
> 2.30.2
> 

      parent reply	other threads:[~2021-08-05  6:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210804212315.265376-1-ariel.dalessandro@collabora.com>
2021-08-05  6:07 ` [RFC connman v1 1/1] gsupplicant: Add support for WPA3-Personal Daniel Wagner
2021-08-05 11:15   ` Ariel D'Alessandro
2021-09-09 11:10     ` Ariel D'Alessandro
2021-09-13  6:27       ` Daniel Wagner
     [not found] ` <20210804212315.265376-2-ariel.dalessandro@collabora.com>
2021-08-05  6:07   ` Daniel Wagner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210805060750.kbrvx5uouuq37egk@beryllium.lan \
    --to=wagi@monom.org \
    --cc=Sven.Dembianny@bshg.com \
    --cc=ariel.dalessandro@collabora.com \
    --cc=connman@lists.linux.dev \
    --cc=iwd@lists.01.org \
    --cc=marcel@holtmann.org \
    --subject='Re: [RFC connman v1 1/1] gsupplicant: Add support for WPA3-Personal transition mode' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).