aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-29 06:45:18 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-30 07:41:26 -0500
commitc604b9f219422e969fe371cc7259de34c3c5601d (patch)
tree01f8773dbdc25cc7d044b0e371acf3a763af1604 /net/mac80211/ieee80211_i.h
parentf94f8b168cf2e46da180bbba2afd626d7af0579d (diff)
mac80211: make ieee80211_build_preq_ies safer
Instead of assuming 200 bytes are always enough for all the IEs we add, give the length of the buffer to the function and warn instead of overrunning. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 8d8bf7136386..53e97dc4e06a 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1034,6 +1034,7 @@ struct ieee80211_local {
1034 enum ieee80211_band hw_scan_band; 1034 enum ieee80211_band hw_scan_band;
1035 int scan_channel_idx; 1035 int scan_channel_idx;
1036 int scan_ies_len; 1036 int scan_ies_len;
1037 int hw_scan_ies_bufsize;
1037 1038
1038 struct work_struct sched_scan_stopped_work; 1039 struct work_struct sched_scan_stopped_work;
1039 struct ieee80211_sub_if_data __rcu *sched_scan_sdata; 1040 struct ieee80211_sub_if_data __rcu *sched_scan_sdata;
@@ -1573,7 +1574,7 @@ void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
1573 const u8 *bssid, u16 stype, u16 reason, 1574 const u8 *bssid, u16 stype, u16 reason,
1574 bool send_frame, u8 *frame_buf); 1575 bool send_frame, u8 *frame_buf);
1575int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, 1576int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
1576 const u8 *ie, size_t ie_len, 1577 size_t buffer_len, const u8 *ie, size_t ie_len,
1577 enum ieee80211_band band, u32 rate_mask, 1578 enum ieee80211_band band, u32 rate_mask,
1578 u8 channel); 1579 u8 channel);
1579struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, 1580struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,