aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-07-11 11:53:20 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-07-15 11:43:21 +0200
commit34d76a14f8f75df1b37557247a973b9093c74a24 (patch)
tree8836ae12c11d592a225075510e8c14d69b40b58b /net/wireless/nl80211.c
parentwifi: cfg80211: set country_elem to NULL (diff)
downloadlinux-dev-34d76a14f8f75df1b37557247a973b9093c74a24.tar.xz
linux-dev-34d76a14f8f75df1b37557247a973b9093c74a24.zip
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>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index ead9bd111280..be969f64b5c3 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -10813,6 +10813,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 {