diff mbox series

[v2,2/4] network: don't allow connection to OWE AKM if disabled

Message ID 20241023182912.128388-2-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [v2,1/4] wiphy: add OweDisable driver quirk | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood Oct. 23, 2024, 6:29 p.m. UTC
---
 src/network.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Denis Kenzior Oct. 24, 2024, 2:02 p.m. UTC | #1
Hi James,

On 10/23/24 1:29 PM, James Prestwood wrote:
> ---
>   src/network.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/src/network.c b/src/network.c
> index 20d9a3dd..5a856fb4 100644
> --- a/src/network.c
> +++ b/src/network.c
> @@ -911,6 +911,9 @@ int network_can_connect_bss(struct network *network, const struct scan_bss *bss)
>   		return ret;
>   	}
>   
> +	if (IE_AKM_IS_OWE(rsn.akm_suites) && wiphy_owe_disabled(wiphy))
> +		return -EPERM;
> +

Hmm, why do we need this if we already check wiphy_owe_disabled in 
wiphy_select_akm in patch 1?

...

Ah, I guess this function doesn't perform the special case check like 
station_build_handshake_rsn() does.  That's probably why we have the problem 
with reconnects

>   	if (!config || !config->have_transition_disable) {
>   		if (band == BAND_FREQ_6_GHZ)
>   			goto mfp_no_tkip;

Regards,
-Denis
diff mbox series

Patch

diff --git a/src/network.c b/src/network.c
index 20d9a3dd..5a856fb4 100644
--- a/src/network.c
+++ b/src/network.c
@@ -911,6 +911,9 @@  int network_can_connect_bss(struct network *network, const struct scan_bss *bss)
 		return ret;
 	}
 
+	if (IE_AKM_IS_OWE(rsn.akm_suites) && wiphy_owe_disabled(wiphy))
+		return -EPERM;
+
 	if (!config || !config->have_transition_disable) {
 		if (band == BAND_FREQ_6_GHZ)
 			goto mfp_no_tkip;