All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v3 10/11] station: make station_can_fast_transition more robust
Date: Wed, 12 May 2021 16:01:47 -0700	[thread overview]
Message-ID: <20210512230148.370858-10-prestwoj@gmail.com> (raw)
In-Reply-To: <20210512230148.370858-1-prestwoj@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]

Check that the current handshake is using an FT AKM and that the
target BSS AKM suites contain an FT AKM.
---
 src/station.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/station.c b/src/station.c
index 385bb272..325121f1 100644
--- a/src/station.c
+++ b/src/station.c
@@ -1796,10 +1796,23 @@ static bool station_can_fast_transition(struct handshake_state *hs,
 						&mdid, NULL, NULL) < 0)
 		return false;
 
-	if (bss->mde_present && l_get_le16(bss->mde) == mdid)
-		return true;
+	if (!(bss->mde_present && l_get_le16(bss->mde) == mdid))
+		return false;
 
-	return false;
+	if (hs->supplicant_ie != NULL) {
+		struct ie_rsn_info rsn_info;
+
+		if (!IE_AKM_IS_FT(hs->akm_suite))
+			return false;
+
+		if (scan_bss_get_rsn_info(bss, &rsn_info) < 0)
+			return false;
+
+		if (!IE_AKM_IS_FT(rsn_info.akm_suites))
+			return false;
+	}
+
+	return true;
 }
 
 static void station_transition_start(struct station *station,
-- 
2.31.1

  parent reply	other threads:[~2021-05-12 23:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12 23:01 [PATCH v3 01/11] station: factor out logic for choosing FT James Prestwood
2021-05-12 23:01 ` [PATCH v3 02/11] station: remove ap_directed_roam check for over-DS James Prestwood
2021-05-12 23:01 ` [PATCH v3 03/11] ft: break up FT action parsing into two steps James Prestwood
2021-05-12 23:01 ` [PATCH v3 04/11] netdev: handle multiple concurrent FT-over-DS action frames James Prestwood
2021-05-12 23:01 ` [PATCH v3 05/11] network: add network_bss_list_get_entries James Prestwood
2021-05-12 23:01 ` [PATCH v3 06/11] station: send FT-over-DS actions upon connection James Prestwood
2021-05-12 23:01 ` [PATCH v3 07/11] netdev: remove callback/userdata/timeout from FT-over-DS action James Prestwood
2021-05-12 23:01 ` [PATCH v3 08/11] auto-t: update FT-over-DS test for new behavior James Prestwood
2021-05-12 23:01 ` [PATCH v3 09/11] ie: use bitwise compare for IE_AKM_IS_FT James Prestwood
2021-05-12 23:01 ` James Prestwood [this message]
2021-05-12 23:01 ` [PATCH v3 11/11] station: use IE_AKM_IS_FT when possible James Prestwood
2021-05-12 23:07 ` [PATCH v3 01/11] station: factor out logic for choosing FT 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=20210512230148.370858-10-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.