Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111620
b: refs/heads/master
c: 9c80d3d
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Sep 11, 2008
1 parent 4f7c1d4 commit 388e8ef
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 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: 5bda617576e58c7213aef5ab90383f303727b5b1
refs/heads/master: 9c80d3dc272ec5ce44a7564e5392f950ad38357a
4 changes: 4 additions & 0 deletions trunk/net/mac80211/mesh_hwmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,10 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
size_t baselen;
u32 last_hop_metric;

/* need action_code */
if (len < IEEE80211_MIN_ACTION_SIZE + 1)
return;

baselen = (u8 *) mgmt->u.action.u.mesh_action.variable - (u8 *) mgmt;
ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable,
len - baselen, &elems);
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/mac80211/mesh_plink.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m
DECLARE_MAC_BUF(mac);
#endif

/* need action_code, aux */
if (len < IEEE80211_MIN_ACTION_SIZE + 3)
return;

if (is_multicast_ether_addr(mgmt->da)) {
mpl_dbg("Mesh plink: ignore frame from multicast address");
return;
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

#define ERP_INFO_USE_PROTECTION BIT(1)

/* mgmt header + 1 byte action code */
/* mgmt header + 1 byte category code */
#define IEEE80211_MIN_ACTION_SIZE (24 + 1)

#define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002
Expand Down Expand Up @@ -2988,7 +2988,8 @@ static void ieee80211_rx_mgmt_action(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_local *local = sdata->local;

if (len < IEEE80211_MIN_ACTION_SIZE)
/* all categories we currently handle have action_code */
if (len < IEEE80211_MIN_ACTION_SIZE + 1)
return;

switch (mgmt->u.action.category) {
Expand Down

0 comments on commit 388e8ef

Please sign in to comment.