Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158895
b: refs/heads/master
c: 3dc27d2
h: refs/heads/master
i:
  158893: 7c6e8d2
  158891: de00e65
  158887: 9faaf0e
  158879: 71b706d
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 10, 2009
1 parent efca10e commit 11f65e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4244f41a040288e07d050ea64f60997c584cce9e
refs/heads/master: 3dc27d25f288c923735e8f10fa8e578be896e96a
10 changes: 6 additions & 4 deletions trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -3119,7 +3119,8 @@ static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info)
}

static int nl80211_crypto_settings(struct genl_info *info,
struct cfg80211_crypto_settings *settings)
struct cfg80211_crypto_settings *settings,
int cipher_limit)
{
settings->control_port = info->attrs[NL80211_ATTR_CONTROL_PORT];

Expand All @@ -3134,7 +3135,7 @@ static int nl80211_crypto_settings(struct genl_info *info,
if (len % sizeof(u32))
return -EINVAL;

if (settings->n_ciphers_pairwise > NL80211_MAX_NR_CIPHER_SUITES)
if (settings->n_ciphers_pairwise > cipher_limit)
return -EINVAL;

memcpy(settings->ciphers_pairwise, data, len);
Expand Down Expand Up @@ -3247,7 +3248,7 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
}
}

err = nl80211_crypto_settings(info, &crypto);
err = nl80211_crypto_settings(info, &crypto, 1);
if (!err)
err = cfg80211_mlme_assoc(rdev, dev, chan, bssid, ssid,
ssid_len, ie, ie_len, use_mfp,
Expand Down Expand Up @@ -3652,7 +3653,8 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info)

connect.privacy = info->attrs[NL80211_ATTR_PRIVACY];

err = nl80211_crypto_settings(info, &connect.crypto);
err = nl80211_crypto_settings(info, &connect.crypto,
NL80211_MAX_NR_CIPHER_SUITES);
if (err)
return err;
rtnl_lock();
Expand Down

0 comments on commit 11f65e5

Please sign in to comment.