From: Johannes Berg <johannes@sipsolutions.net>
To: Saru2003 <sarvesh20123@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix: Ensure auth_data and ap_addr are properly set before marking STA as authenticated
Date: Fri, 08 Nov 2024 08:45:20 +0100 [thread overview]
Message-ID: <596b789eec8c6ffdfbd6a9073464a5f19a050336.camel@sipsolutions.net> (raw)
In-Reply-To: <20241108022828.6571-1-sarvesh20123@gmail.com>
On Fri, 2024-11-08 at 07:58 +0530, Saru2003 wrote:
>
> +++ b/net/mac80211/mlme.c
> @@ -4247,8 +4247,15 @@ static void ieee80211_auth_challenge(struct ieee80211_sub_if_data *sdata,
> static bool ieee80211_mark_sta_auth(struct ieee80211_sub_if_data *sdata)
> {
> struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
> - const u8 *ap_addr = ifmgd->auth_data->ap_addr;
> + const u8 *ap_addr;
> struct sta_info *sta;
> +
> + if (!ifmgd->auth_data ||
That's ridiculous. By the argument behind this we could add probably
hundreds of such checks all over the place.
> !ifmgd->auth_data->ap_addr) {
and that's even a compiler warning.
> sta = sta_info_get(sdata, ap_addr);
> if (!sta) {
> - WARN_ONCE(1, "%s: STA %pM not found", sdata->name, ap_addr);
> + sdata_info(sdata, "STA %pM not found, skipping authentication mark\n", ap_addr);
> return false;
That's also wrong, it doesn't just skip that part.
johannes
next prev parent reply other threads:[~2024-11-08 7:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 2:28 Saru2003
2024-11-08 7:45 ` Johannes Berg [this message]
2024-11-08 9:10 ` kernel test robot
2024-11-08 9:10 ` kernel test robot
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=596b789eec8c6ffdfbd6a9073464a5f19a050336.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sarvesh20123@gmail.com \
/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
all inboxes | Powered by JetHome®