Search Linux Wireless

Re: [PATCH v2] wireless: support configuring vdev mac addr on create.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux