From: Ben Greear <greearb@candelatech.com>
To: Arend van Spriel <arend@broadcom.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2] wireless: support configuring vdev mac addr on create.
Date: Wed, 01 Oct 2014 13:20:14 -0700 [thread overview]
Message-ID: <542C61FE.3060109@candelatech.com> (raw)
In-Reply-To: <542C5C69.9090608@broadcom.com>
On 10/01/2014 12:56 PM, Arend van Spriel wrote:
>> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
>> index 8a010bd..cf79707 100644
>> --- a/net/wireless/nl80211.c
>> +++ b/net/wireless/nl80211.c
>> @@ -2605,7 +2605,7 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
>> !(rdev->wiphy.interface_modes & (1 << type)))
>> return -EOPNOTSUPP;
>>
>> - if (type == NL80211_IFTYPE_P2P_DEVICE && info->attrs[NL80211_ATTR_MAC]) {
>> + if (info->attrs[NL80211_ATTR_MAC]) {
>> nla_memcpy(params.macaddr, info->attrs[NL80211_ATTR_MAC],
>> ETH_ALEN);
>> if (!is_valid_ether_addr(params.macaddr))
>
> Hi Ben,
>
> Just noticed this last line and realized that my comment on the previous
> patch is invalid. nl80211.c already validates the mac address received
> from iw. The zero address check in ieee80211_if_add() is to determine
> whether iw provided a mac address or not.
Well, I guess either way is fine with me. Might be nice to apply v2
just in case that code is ever called by something that is not validating
the address.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
prev parent reply other threads:[~2014-10-01 20:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 17:57 [PATCH v2] wireless: support configuring vdev mac addr on create greearb
2014-10-01 19:56 ` Arend van Spriel
2014-10-01 20:20 ` Ben Greear [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=542C61FE.3060109@candelatech.com \
--to=greearb@candelatech.com \
--cc=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).