[PATCH 5/7] netdev: Create owe_sm for fullmac connections

Denis Kenzior
2024-08-05T14:07:28Z

Somehow this ability was lost in the refactoring. OWE was intended to
be used on fullmac cards, but the state machine is only actually created
if the connection type ends up being softmac.

Fixes: 8b6ad5d3b9ec ("owe: netdev: refactor to remove OWE as an auth-proto")
---
src/netdev.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/netdev.c b/src/netdev.c
index e27a0019b7ea..50e60c5d0c98 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -3826,6 +3826,12 @@ static void netdev_connect_common(struct netdev *netdev,
if (!is_rsn)
goto build_cmd_connect;

+ /* For OWE, always use the CMD_CONNECT path */
+ if (IE_AKM_IS_OWE(hs->akm_suite)) {
+ netdev->owe_sm = owe_sm_new(hs);
+ goto build_cmd_connect;
+ }
+
if (nhs->type != CONNECTION_TYPE_SOFTMAC)
goto build_cmd_connect;

@@ -3848,10 +3854,6 @@ static void netdev_connect_common(struct netdev *netdev,
}

break;
- case IE_RSN_AKM_SUITE_OWE:
- netdev->owe_sm = owe_sm_new(hs);
-
- goto build_cmd_connect;
case IE_RSN_AKM_SUITE_FILS_SHA256:
case IE_RSN_AKM_SUITE_FILS_SHA384:
case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256:
--
2.45.2