From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 02/11] knownnetworks: add option to force a default ECC group
Date: Tue, 27 Feb 2024 10:33:56 -0800 [thread overview]
Message-ID: <20240227183405.257206-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20240227183405.257206-1-prestwoj@gmail.com>
This adds the option [Settings].UseDefaultEccGroup which allows a
network profile to specify the behavior when using an ECC-based
protocol. If unset (default) IWD will learn the behavior of the
network for the lifetime of its process.
Many APs do not support group 20 which IWD tries first by default.
This leads to an initial failure followed by a retry using group 19.
This option will allow the user to configure IWD to use group 19
first or learn the network capabilities, if the authentication fails
with group 20 IWD will always use group 19 for the process lifetime.
---
src/knownnetworks.c | 11 +++++++++++
src/knownnetworks.h | 8 ++++++++
2 files changed, 19 insertions(+)
diff --git a/src/knownnetworks.c b/src/knownnetworks.c
index fc810057..6f65d2b3 100644
--- a/src/knownnetworks.c
+++ b/src/knownnetworks.c
@@ -123,6 +123,17 @@ void __network_config_parse(const struct l_settings *settings,
l_strfreev(modes);
}
+
+ if (l_settings_has_key(settings, NET_USE_DEFAULT_ECC_GROUP)) {
+ if (l_settings_get_bool(settings,
+ NET_USE_DEFAULT_ECC_GROUP, &b)) {
+ config->ecc_group = b ? KNOWN_NETWORK_ECC_GROUP_DEFAULT
+ : KNOWN_NETWORK_ECC_GROUP_MOST_SECURE;
+ } else
+ l_warn("[%s].%s is not a boolean value",
+ NET_USE_DEFAULT_ECC_GROUP);
+ } else
+ config->ecc_group = KNOWN_NETWORK_ECC_GROUP_AUTO;
}
void __network_info_init(struct network_info *info,
diff --git a/src/knownnetworks.h b/src/knownnetworks.h
index 741d42ed..c81bd9aa 100644
--- a/src/knownnetworks.h
+++ b/src/knownnetworks.h
@@ -27,6 +27,7 @@
#define NET_ADDRESS_OVERRIDE SETTINGS, "AddressOverride"
#define NET_TRANSITION_DISABLE SETTINGS, "TransitionDisable"
#define NET_TRANSITION_DISABLE_MODES SETTINGS, "DisabledTransitionModes"
+#define NET_USE_DEFAULT_ECC_GROUP SETTINGS, "UseDefaultEccGroup"
enum security;
struct scan_freq_set;
@@ -38,6 +39,12 @@ enum known_networks_event {
KNOWN_NETWORKS_EVENT_UPDATED,
};
+enum known_network_ecc_group {
+ KNOWN_NETWORK_ECC_GROUP_AUTO = 0,
+ KNOWN_NETWORK_ECC_GROUP_DEFAULT,
+ KNOWN_NETWORK_ECC_GROUP_MOST_SECURE,
+};
+
struct network_info_ops {
struct l_settings *(*open)(struct network_info *info);
int (*touch)(struct network_info *info);
@@ -72,6 +79,7 @@ struct network_config {
uint8_t sta_addr[6];
bool have_transition_disable : 1;
uint8_t transition_disable;
+ enum known_network_ecc_group ecc_group;
};
struct network_info {
--
2.34.1
next prev 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 ` James Prestwood [this message]
2024-02-27 18:33 ` [PATCH 03/11] network: retain default ECC group for OWE after setting James Prestwood
2024-02-27 18:33 ` [PATCH 04/11] network: set use default ECC group in handshake setup James Prestwood
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-2-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