Merge "cfg80211: Validate frequencies nested in NL80211_ATTR_SCAN_FREQUENCIES"
This commit is contained in:
commit
4ba44196e6
1 changed files with 6 additions and 2 deletions
|
@ -302,8 +302,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
|
|||
[NL80211_ATTR_WPA_VERSIONS] = { .type = NLA_U32 },
|
||||
[NL80211_ATTR_PID] = { .type = NLA_U32 },
|
||||
[NL80211_ATTR_4ADDR] = { .type = NLA_U8 },
|
||||
[NL80211_ATTR_PMKID] = { .type = NLA_BINARY,
|
||||
.len = WLAN_PMKID_LEN },
|
||||
[NL80211_ATTR_PMKID] = { .len = WLAN_PMKID_LEN },
|
||||
[NL80211_ATTR_DURATION] = { .type = NLA_U32 },
|
||||
[NL80211_ATTR_COOKIE] = { .type = NLA_U64 },
|
||||
[NL80211_ATTR_TX_RATES] = { .type = NLA_NESTED },
|
||||
|
@ -359,6 +358,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
|
|||
[NL80211_ATTR_SCAN_FLAGS] = { .type = NLA_U32 },
|
||||
[NL80211_ATTR_P2P_CTWINDOW] = { .type = NLA_U8 },
|
||||
[NL80211_ATTR_P2P_OPPPS] = { .type = NLA_U8 },
|
||||
[NL80211_ATTR_LOCAL_MESH_POWER_MODE] = {. type = NLA_U32 },
|
||||
[NL80211_ATTR_ACL_POLICY] = {. type = NLA_U32 },
|
||||
[NL80211_ATTR_MAC_ADDRS] = { .type = NLA_NESTED },
|
||||
[NL80211_ATTR_STA_CAPABILITY] = { .type = NLA_U16 },
|
||||
|
@ -6124,6 +6124,10 @@ static int validate_scan_freqs(struct nlattr *freqs)
|
|||
struct nlattr *attr1, *attr2;
|
||||
int n_channels = 0, tmp1, tmp2;
|
||||
|
||||
nla_for_each_nested(attr1, freqs, tmp1)
|
||||
if (nla_len(attr1) != sizeof(u32))
|
||||
return 0;
|
||||
|
||||
nla_for_each_nested(attr1, freqs, tmp1) {
|
||||
n_channels++;
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue