[PATCH] nl80211: correct netlink attributes of set_supp_port() for MLD

Jouni Malinen j at w1.fi
Mon Dec 23 02:15:16 PST 2024


On Mon, Dec 23, 2024 at 02:48:40PM +0800, Zong-Zhe Yang wrote:
> On Mon, Dec 23, 2024 at 6:06 AM Jouni Malinen <j at w1.fi> wrote:
> >
> > On Fri, Nov 22, 2024 at 04:21:43PM +0800, Zong-Zhe Yang wrote:
> > > When MLD, wpa_driver_nl80211_set_supp_port() gets
> > > `nl80211: Failed to set STA flag: -22 (Invalid argument)`
> > > due to imprecise netlink attributes.
> >
> > Would you be able to share a debug log showing that? I was unable to
> > reproduce that in my testing.
>
> It can be reproduced by connecting a MLD AP with an assoc link which
> link_id != 0. (with mac80211 driver)

Not in my test setup.. Do you have the following commit in the kernel
you are using?

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=03ecd745dde181f537bf84374caafb121463136b
(wifi: mac80211: fix erroneous errors for STA changes)

> u32 link_id = params->link_id < 0 ? 0 : params->link_id;
> [...]
> 
> Because @params->link_id is not filled, if assoc link id is not 0 either,
> @link_id cannot map to any link in the following. Finally, an error returns.
> 
> This looked like an inconvenient constraint. And, I originally thought it's not
> harmful to let wpa_supplicant pass the assoc link id at authorization status.
> But, prehapes, there will be other suggestions for this problem.

I did not check all the details, but if this operation were to be
specifically for a single link, wpa_supplicant might need to iterate the
operation over all currently used links. In any case, that kernel commit
referenced above seems to be addressing the error return in one way.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list