Search Linux Wireless

RE: [PATCH] mac80211: Get IV len from key conf and not cipher scheme

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

 



>We use cipher scheme to support WAPI in both STA and AP mode.
>The patch is for the AP use case when sending a broadcast message that needs encryption. So we want to call 
>ieee80211_crypto_cs_encrypt even if sta is NULL.

So, on ieee80211_add_key() function call we fetch a cipher scheme and if it's present ieee80211_key_alloc() updates key->conf.iv_len setting it to cs->hdr_len. If sta is present cs is also stored in sta->cipher_scheme.

On Tx...
If a cipher scheme was found and sta is present, the ieee80211_crypto_cs_encrypt() supposes to behave the same as before the change. That's looks fine.

If sta is not present your patch changes the flow allowing to use key->conf.iv_len instead of cs->hdr_len associated with sta. In this case you don't need Rx handling without sta because bcast/mcast Rx is handled in STA mode only and in this case sta is present. That's looks fine too.

If key is installed without cipher scheme and the cipher is not in explicitly implemented ciphers setting non zero key->conf.iv_len, the ieee80211_key_alloc() function will set key->conf.iv_len to 0.  Perhaps it makes sense to add key->conf.iv_len == 0 verification to ieee80211_crypto_cs_encrypt() before extending skb head. Does it make sense?

Max



--
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