Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH v2 3/4] network: add setter/getter/flag for forcing default OWE group
Date: Mon,  8 Aug 2022 11:22:58 -0700	[thread overview]
Message-ID: <20220808182259.19402-3-prestwoj@gmail.com> (raw)
In-Reply-To: <20220808182259.19402-1-prestwoj@gmail.com>

If a OWE network is buggy and requires the default group this info
needs to be stored in network in order for it to set this into the
handshake on future connect attempts.
---
 src/network.c | 14 ++++++++++++++
 src/network.h |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/src/network.c b/src/network.c
index 70cb925c..c0befa42 100644
--- a/src/network.c
+++ b/src/network.c
@@ -88,6 +88,7 @@ struct network {
 	bool provisioning_hidden:1;
 	uint8_t transition_disable; /* Temporary cache until info is set */
 	bool have_transition_disable:1;
+	bool force_default_owe_group:1;
 	int rank;
 	/* Holds DBus Connect() message if it comes in before ANQP finishes */
 	struct l_dbus_message *connect_after_anqp;
@@ -525,6 +526,9 @@ 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_owe_group;
+
 	/*
 	 * The randomization options in the provisioning file are dependent on
 	 * main.conf: [General].AddressRandomization=network. Any other value
@@ -764,6 +768,16 @@ void network_set_info(struct network *network, struct network_info *info)
 					IWD_NETWORK_INTERFACE, "KnownNetwork");
 }
 
+void network_set_force_default_owe_group(struct network *network)
+{
+	network->force_default_owe_group = true;
+}
+
+bool network_get_force_default_owe_group(struct network *network)
+{
+	return network->force_default_owe_group;
+}
+
 static inline bool __bss_is_sae(const struct scan_bss *bss,
 						const struct ie_rsn_info *rsn)
 {
diff --git a/src/network.h b/src/network.h
index d69d63b0..c6b99f6c 100644
--- a/src/network.h
+++ b/src/network.h
@@ -58,6 +58,8 @@ void network_sync_settings(struct network *network);
 
 const struct network_info *network_get_info(const struct network *network);
 void network_set_info(struct network *network, struct network_info *info);
+void network_set_force_default_owe_group(struct network *network);
+bool network_get_force_default_owe_group(struct network *network);
 
 int network_can_connect_bss(struct network *network,
 						const struct scan_bss *bss);
-- 
2.34.3


  parent reply	other threads:[~2022-08-08 18:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08 18:22 [PATCH v2 1/4] handshake: add force_default_owe_group flag James Prestwood
2022-08-08 18:22 ` [PATCH v2 2/4] owe: allow OWE to force group 19 James Prestwood
2022-08-08 18:22 ` James Prestwood [this message]
2022-08-08 18:22 ` [PATCH v2 4/4] station: re-try OWE if buggy AP is detected James Prestwood
2022-08-08 18:37 ` [PATCH v2 1/4] handshake: add force_default_owe_group flag 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=20220808182259.19402-3-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