From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [RFC] netdev: destroy auth-proto in connect event, for ext auth
Date: Thu, 19 Dec 2024 04:44:42 -0800 [thread overview]
Message-ID: <20241219124442.146136-1-prestwoj@gmail.com> (raw)
With external auth there is no associate event meaning the auth proto
never gets freed, which prevents eapol from starting inside the
OCI callback. Check for this specific case and free the auth proto
in the connect event.
---
src/netdev.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/netdev.c b/src/netdev.c
index 02496c92..9deff699 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -2615,6 +2615,8 @@ static void netdev_connect_event(struct l_genl_msg *msg, struct netdev *netdev)
struct handshake_state *hs = netdev->handshake;
bool timeout = false;
uint32_t timeout_reason = 0;
+ struct netdev_handshake_state *nhs = l_container_of(netdev->handshake,
+ struct netdev_handshake_state, super);
l_debug("");
@@ -2821,6 +2823,16 @@ process_resp_ies:
l_debug("Request / Response IEs parsed");
+ /*
+ * This should only be the case for Fullmac/External auth. Here we don't
+ * get an associate event, so we need to destroy the auth-proto now
+ * so eapol gets started within the OCI callback
+ */
+ if (netdev->ap && nhs->type == CONNECTION_TYPE_FULLMAC) {
+ auth_proto_free(netdev->ap);
+ netdev->ap = NULL;
+ }
+
if (netdev->sm) {
if (!hs->chandef) {
if (netdev_get_oci(netdev) < 0)
--
2.34.1
next reply other threads:[~2024-12-19 12:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 12:44 James Prestwood [this message]
2024-12-19 17:03 ` [RFC] netdev: destroy auth-proto in connect event, for ext auth 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=20241219124442.146136-1-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