]> git.ipfire.org Git - thirdparty/hostap.git/commit
nl80211: Fix link indexing in nl80211_connect_common()
authorBenjamin Berg <benjamin.berg@intel.com>
Tue, 20 Feb 2024 13:18:10 +0000 (14:18 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 2 Mar 2024 08:59:02 +0000 (10:59 +0200)
commit6cb421c1faf32d1d8ea386b9ac1021c8d9ae046e
tree9d15591d4e68a62bdce9c7f45cab9b758ffad482
parent408a399aa4e44dfc16f1c9ee92df7aa96b1a4b4d
nl80211: Fix link indexing in nl80211_connect_common()

In some places the wrong index variable was used to access the link
configuration. Fix this by simply using link_id instead of i.

With this, the i loop variable is not needed anymore. We can simply
always pass 0 to nla_nest_start(). Also, the kernel does not care about
the order that the links are provides, so just remove the special
handling for the association link.

Fixes: a2c4c0b1b6bb ("nl80211: Support MLD association request")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
src/drivers/driver_nl80211.c