public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 04/11] network: set use default ECC group in handshake setup
Date: Tue, 27 Feb 2024 10:33:58 -0800	[thread overview]
Message-ID: <20240227183405.257206-4-prestwoj@gmail.com> (raw)
In-Reply-To: <20240227183405.257206-1-prestwoj@gmail.com>

If either the settings specify it, or the scan_bss is flagged, set
the use_default_ecc_group flag in the handshake.

This also renames the flag to cover both OWE and SAE
---
 src/handshake.h | 2 +-
 src/network.c   | 4 ++--
 src/owe.c       | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/handshake.h b/src/handshake.h
index 6c58e4d2..62118fe2 100644
--- a/src/handshake.h
+++ b/src/handshake.h
@@ -140,7 +140,7 @@ struct handshake_state {
 	bool authenticator_ocvc : 1;
 	bool supplicant_ocvc : 1;
 	bool ext_key_id_capable : 1;
-	bool force_default_owe_group : 1;
+	bool force_default_ecc_group : 1;
 	uint8_t ssid[32];
 	size_t ssid_len;
 	char *passphrase;
diff --git a/src/network.c b/src/network.c
index a0a89e63..7b996f51 100644
--- a/src/network.c
+++ b/src/network.c
@@ -556,8 +556,8 @@ int network_handshake_setup(struct network *network, struct scan_bss *bss,
 		handshake_state_set_protocol_version(hs, eapol_proto_version);
 	}
 
-	if (hs->akm_suite == IE_RSN_AKM_SUITE_OWE)
-		hs->force_default_owe_group = network->force_default_ecc_group;
+	hs->force_default_ecc_group = network->force_default_ecc_group ||
+						bss->force_default_sae_group;
 
 	/*
 	 * The randomization options in the provisioning file are dependent on
diff --git a/src/owe.c b/src/owe.c
index faa4e17d..da1d643b 100644
--- a/src/owe.c
+++ b/src/owe.c
@@ -45,7 +45,7 @@ struct owe_sm {
 
 static bool owe_reset(struct owe_sm *owe)
 {
-	if (owe->hs->force_default_owe_group) {
+	if (owe->hs->force_default_ecc_group) {
 		if (owe->retry != 0) {
 			l_warn("Forced default OWE group but was rejected!");
 			return false;
-- 
2.34.1


  parent reply	other threads:[~2024-02-27 18:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 18:33 [PATCH 01/11] doc: Document UseDefaultEccGroup James Prestwood
2024-02-27 18:33 ` [PATCH 02/11] knownnetworks: add option to force a default ECC group James Prestwood
2024-02-27 18:33 ` [PATCH 03/11] network: retain default ECC group for OWE after setting James Prestwood
2024-02-27 18:33 ` James Prestwood [this message]
2024-02-27 18:33 ` [PATCH 05/11] sae: remove sae_sm_set_force_group_19, use handshake James Prestwood
2024-02-27 18:34 ` [PATCH 06/11] netdev: add NETDEV_EVENT_ECC_GROUP_RETRY, handle in station James Prestwood
2024-02-27 18:34 ` [PATCH 07/11] auto-t: add Device.event_ocurred James Prestwood
2024-02-27 18:34 ` [PATCH 08/11] auto-t: add HostapdCLI.sta_status James Prestwood
2024-02-27 18:34 ` [PATCH 09/11] auto-t: refactor/fix testSAE James Prestwood
2024-02-27 18:34 ` [PATCH 10/11] auto-t: Add test for new SAE default group behavior James Prestwood
2024-02-27 18:34 ` [PATCH 11/11] auto-t: add OWE test for auto default group James Prestwood
2024-02-27 19:56 ` [PATCH 01/11] doc: Document UseDefaultEccGroup Denis Kenzior

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=20240227183405.257206-4-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.linux.dev \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox