Skip to content

Commit

Permalink
cfg80211: pmsr: fix MAC address setting
Browse files Browse the repository at this point in the history
When we *don't* have a MAC address attribute, we shouldn't
try to use this - this was intended to copy the local MAC
address instead, so fix it.

Fixes: 9bb7e0f ("cfg80211: add peer measurement with FTM initiator API")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Feb 6, 2019
1 parent f09bef6 commit 0acd992
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/wireless/pmsr.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ int nl80211_pmsr_start(struct sk_buff *skb, struct genl_info *info)
if (err)
goto out_err;
} else {
memcpy(req->mac_addr, nla_data(info->attrs[NL80211_ATTR_MAC]),
ETH_ALEN);
memcpy(req->mac_addr, wdev_address(wdev), ETH_ALEN);
memset(req->mac_addr_mask, 0xff, ETH_ALEN);
}

Expand Down

0 comments on commit 0acd992

Please sign in to comment.