diff options
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 11089541bb03..430b432bc3f0 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -4527,8 +4527,12 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) | |||
4527 | 4527 | ||
4528 | wiphy = &rdev->wiphy; | 4528 | wiphy = &rdev->wiphy; |
4529 | 4529 | ||
4530 | if (info->attrs[NL80211_ATTR_MAC]) | 4530 | if (info->attrs[NL80211_ATTR_MAC]) { |
4531 | ibss.bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); | 4531 | ibss.bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); |
4532 | |||
4533 | if (!is_valid_ether_addr(ibss.bssid)) | ||
4534 | return -EINVAL; | ||
4535 | } | ||
4532 | ibss.ssid = nla_data(info->attrs[NL80211_ATTR_SSID]); | 4536 | ibss.ssid = nla_data(info->attrs[NL80211_ATTR_SSID]); |
4533 | ibss.ssid_len = nla_len(info->attrs[NL80211_ATTR_SSID]); | 4537 | ibss.ssid_len = nla_len(info->attrs[NL80211_ATTR_SSID]); |
4534 | 4538 | ||