UPSTREAM: wifi: nl80211: reject link specific elements on assoc link

When we associate, we'll include all the elements for the
link we're sending the association request on in the frame
and the specific ones for other links in the multi-link
element container. Prohibit adding link-specific elements
for the association link.

Fixes: d648c23024bd ("wifi: nl80211: support MLO in auth/assoc")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 253289327
Change-Id: I80612e622ae70c57280809a57cf1a4e433b84589
(cherry picked from commit 34d76a14f8f75df1b37557247a973b9093c74a24)
Signed-off-by: Kiran Kumar Lokere <quic_klokere@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
This commit is contained in:
Johannes Berg
2022-07-11 11:53:20 +02:00
committed by Todd Kjos
parent 3594b5cb98
commit c74a4e8436

View File

@@ -10870,6 +10870,13 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
goto free;
}
if (req.links[req.link_id].elems_len) {
GENL_SET_ERR_MSG(info,
"cannot have per-link elems on assoc link");
err = -EINVAL;
goto free;
}
kfree(attrs);
attrs = NULL;
} else {