nl80211: fix nlmsg allocation in cfg80211_ft_event

Allocation size of nlmsg in cfg80211_ft_event is based on ric_ies_len
and doesn't take into account ies_len. This leads to
NL80211_CMD_FT_EVENT message construction failure in case ft_event
contains large enough ies buffer.
Add ies_len to the nlmsg allocation size.

Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Dedy Lansky 2018-05-17 16:25:03 +03:00 committed by Johannes Berg
parent 814596495d
commit 1039d08100
1 changed files with 2 additions and 1 deletions

View File

@ -15555,7 +15555,8 @@ void cfg80211_ft_event(struct net_device *netdev,
if (!ft_event->target_ap)
return;
msg = nlmsg_new(100 + ft_event->ric_ies_len, GFP_KERNEL);
msg = nlmsg_new(100 + ft_event->ies_len + ft_event->ric_ies_len,
GFP_KERNEL);
if (!msg)
return;