提交 0acd9928 编写于 作者: J Johannes Berg

cfg80211: pmsr: fix MAC address setting

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: 9bb7e0f2 ("cfg80211: add peer measurement with FTM initiator API")
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 f09bef61
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册