Skip to contentSkip to conversation

gsupplicant: Add support for WPA3-Personal

RFC In review Ariel D'Alessandro 2 participants 7 messages Aug 4, 2021 – Sep 13, 2021

lore
Share & tools
lore
#0 lore raw

RFC 1/1 gsupplicant: Add support for WPA3-Personal

Hi all, Daniel:

WPA3 support has been recently added to connman (wpa_supplicant). As we've been discussing on a previous thread, this only supports WPA3-Personal-only mode.

This RFC patchset 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

This patch applies cleanly on top of current master branch (commit e36a38d8).

I'd like to hear any thoughts you might have about this. For reference, see wpa_supplicant configuration [0].

Regards,
Ariel D'Alessandro

[0] https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf

Ariel D'Alessandro (1):
gsupplicant: Add support for WPA3-Personal transition mode

 gsupplicant/supplicant.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)
Signature · 1 line
2.30.2
#1 lore raw

RFC 1/1 gsupplicant: Add support for WPA3-Personal transition mode

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

---
 gsupplicant/supplicant.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)
gsupplicant/supplicant.c +19 -10
index 58c78fd1..8316f48a 100644
@@ -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);
Signature · 1 line
2.30.2
#2 lore raw

Re: [RFC connman v1 1/1] gsupplicant: Add support for WPA3-Personal transition mode

[adding the new mailing list]

Quoted 78 lines · Ariel D'Alessandro

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

---
 gsupplicant/supplicant.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)
gsupplicant/supplicant.c +19 -10
index 58c78fd1..8316f48a 100644
@@ -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);
Signature · 1 line
2.30.2
#3 lore raw
In reply to Ariel D'Alessandro

Hi Ariel,

Quoted 12 lines · Ariel D'Alessandro

Hi all, Daniel:

WPA3 support has been recently added to connman (wpa_supplicant). As we've been discussing on a previous thread, this only supports WPA3-Personal-only mode.

This RFC patchset 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:

Quoted 8 lines

* WPA3-Personal-only mode: key_mgmt="SAE" ; ieee80211w=2
* WPA3-Personal transition mode: key_mgmt="SAE WPA-PSK" ; ieee80211w=1

This patch applies cleanly on top of current master branch (commit e36a38d8).

I'd like to hear any thoughts you might have about this. For reference, see wpa_supplicant configuration [0].

This looks good. If no one speaks up I am going to apply it.

Daniel

ps: we have a new mailing list (connman(a)lists.linux.dev). The old one was shutdown.

Quoted 15 lines

Regards,
Ariel D'Alessandro

[0] https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf

Ariel D'Alessandro (1):
gsupplicant: Add support for WPA3-Personal transition mode

 gsupplicant/supplicant.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)
Signature · 1 line
2.30.2
#4 lore raw

Hi Daniel,

Quoted 18 lines · Daniel Wagner

Hi Ariel,

Quoted 15 lines · Ariel D'Alessandro

Hi all, Daniel:

WPA3 support has been recently added to connman (wpa_supplicant). As we've been discussing on a previous thread, this only supports WPA3-Personal-only mode.

This RFC patchset 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

Quoted 7 lines
Quoted 5 lines

This patch applies cleanly on top of current master branch (commit e36a38d8).

I'd like to hear any thoughts you might have about this. For reference, see wpa_supplicant configuration [0].

This looks good. If no one speaks up I am going to apply it.

Sounds good.

Quoted 5 lines

Daniel

ps: we have a new mailing list (connman(a)lists.linux.dev). The old one was shutdown.

Thanks for pointing that out!

Ariel

#5 lore raw

Hi Daniel,

Quoted 28 lines · Ariel D'Alessandro

Hi Daniel,

Quoted 25 lines · Daniel Wagner

Hi Ariel,

Quoted 12 lines · Ariel D'Alessandro

Hi all, Daniel:

WPA3 support has been recently added to connman (wpa_supplicant). As we've been discussing on a previous thread, this only supports WPA3-Personal-only mode.

This RFC patchset 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:

Quoted 8 lines

* WPA3-Personal-only mode: key_mgmt="SAE" ; ieee80211w=2
* WPA3-Personal transition mode: key_mgmt="SAE WPA-PSK" ; ieee80211w=1

This patch applies cleanly on top of current master branch (commit e36a38d8).

I'd like to hear any thoughts you might have about this. For reference, see wpa_supplicant configuration [0].

This looks good. If no one speaks up I am going to apply it.

Any other feedback on this one? Can we merge it?

Thanks,
Ariel

#6 lore raw

Hi Ariel,

[back from holiday :)]

Quoted 3 lines · Ariel D'Alessandro
Quoted 1 line
Quoted 1 line

This looks good. If no one speaks up I am going to apply it.

Any other feedback on this one? Can we merge it?

Sure, patch applied.

Thanks!
Daniel