Re: [PATCH] mac80211 : fix a race with update_tkip_key

Johannes Berg
2009-06-09T14:03:29Z

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

On Mon, 2009-06-08 at 19:51 +0200, gregor kowski wrote:

> > There's a quite obvious disconnect between what your patch does and what
> > your description says, please fix one of them. As it is, the patch only
> > skips the IV rollover which is *completely* wrong because it will call
> > the function for *every* packet.

> I don't understand what you mean : the callback will be called for
> every packet the hardware doesn't decrypted. If the hardware decrypt
> the packet, only_iv is set and we don't go here.

Right. But drivers are free to even only _encrypt_ tkip frames and never
_decrypt_ them after having accepted a hardware key, iow that is
perfectly valid behaviour and I don't think we should keep uploading the
key to the driver. Worst case is that the proper upload fails and we
decrypt all frames in software until the next rollover.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]