Search Linux Wireless

Re: [PATCHv2 1/2] mac80211: export ieee80211_send_deauth_disassoc for usage outside of mlme.c

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

 



On 07/09/2012 13:18, Johannes Berg wrote:
> On Fri, 2012-09-07 at 11:50 +0200, Nicolas Cavallari wrote:
>> On 07/09/2012 10:25, Johannes Berg wrote:
>>> On Thu, 2012-09-06 at 19:07 +0200, Antonio Quartulli wrote:
>>>
>>>> -		if (!(ifmgd->flags & IEEE80211_STA_MFP_ENABLED))
>>>> -			IEEE80211_SKB_CB(skb)->flags |=
>>>> -				IEEE80211_TX_INTFL_DONT_ENCRYPT;
>>>
>>>
>>>> +		if (sdata->vif.type == NL80211_IFTYPE_STATION &&
>>>> +		    !(sdata->u.mgd.flags & IEEE80211_STA_MFP_ENABLED))
>>>> +			IEEE80211_SKB_CB(skb)->flags |=
>>>> +				IEEE80211_TX_INTFL_DONT_ENCRYPT;
>>>
>>> It would seem that this should be 
>>>
>>> 	if (sdata->vif.type != NL80211_IFTYPE_STATION ||
>>> 	    !(flags & MFP_ENABLED))
>>>
>>> ?
>>
>> Or just never set TX_INTFL_DONT_ENCRYPT at all and rely on
>> ieee80211_tx_h_select_key() to do the right thing ?
> 
> I don't think it can do the right thing, it doesn't check whether MFP is
> enabled or not...

It does; The first part try to encrypt everything, the second part
disable encryption if ccmp is selected and !ieee80211_is_data_present &&
!ieee80211_use_mfp,
which test, among other things, for the sta's WLAN_STA_MFP flag if sta
!= null.

If tx_h_select_key does not select the right key in this case, i think
we have bigger problems.

> unless you want to test all those cases I'd rather not
> change it :)

Not worth the trouble in this case, but i think there is too much code
that sets TX_INTFL_DONT_ENCRYPT when it shouldn't.
--
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