linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <j@w1.fi>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC PATCH 4/7] 802.11w: Use BIP (AES-128-CMAC)
Date: Wed, 18 Jun 2008 12:17:48 +0200	[thread overview]
Message-ID: <1213784268.1312.9.camel@johannes.berg> (raw)
In-Reply-To: <20080617155920.329586297@localhost>

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

One more thing:

> +/* Get the BIP key index from MMIE; return -1 if this is not a BIP frame */
> +static int ieee80211_get_mmie_keyidx(struct sk_buff *skb)
> +{
> +	struct ieee80211_mgmt *hdr = (struct ieee80211_mgmt *) skb->data;
> +	struct ieee80211_mmie *mmie;
> +
> +	if (skb->len < 24 + sizeof(*mmie) ||
> +	    !is_multicast_ether_addr(hdr->da))
> +		return -1;
> +
> +	if (!ieee80211_is_disassoc(hdr->frame_control) &&
> +	    !ieee80211_is_deauth(hdr->frame_control) &&
> +	    !ieee80211_is_action(hdr->frame_control))
> +		return -1; /* not a robust management frame */

If you reorder the code a bit, you can use the helper below here as
well.

> +static int ieee80211_is_robust_mgmt_frame(__le16 fc)
> +{
> +	return ieee80211_is_disassoc(fc) ||
> +		ieee80211_is_deauth(fc) ||
> +		ieee80211_is_action(fc);
> +}

johannes

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

  parent reply	other threads:[~2008-06-18 10:18 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17 15:40 [RFC PATCH 0/7] IEEE 802.11w / management frame protection Jouni Malinen
2008-06-17 15:40 ` [RFC PATCH 1/7] 802.11w: STA flag for MFP Jouni Malinen
2008-06-17 15:40 ` [RFC PATCH 2/7] 802.11w: CCMP for management frames Jouni Malinen
2008-06-17 15:40 ` [RFC PATCH 3/7] 802.11w: Add BIP (AES-128-CMAC) Jouni Malinen
2008-06-17 16:55   ` Johannes Berg
2008-06-17 17:22     ` Harvey Harrison
2008-06-17 18:06     ` Jouni Malinen
2008-06-17 18:08       ` Michael Buesch
2008-06-17 18:19       ` Johannes Berg
2008-06-17 18:50         ` Jouni Malinen
2008-06-17 18:56           ` Johannes Berg
2008-06-17 15:40 ` [RFC PATCH 4/7] 802.11w: Use " Jouni Malinen
2008-06-17 17:05   ` Johannes Berg
2008-06-17 18:10     ` Jouni Malinen
2008-06-17 18:27       ` Johannes Berg
2008-06-18 10:17   ` Johannes Berg [this message]
2008-06-17 15:40 ` [RFC PATCH 5/7] 802.11w: WEXT parameter for setting mgmt cipher Jouni Malinen
2008-06-17 15:40 ` [RFC PATCH 6/7] 802.11w: WEXT configuration for IGTK Jouni Malinen
2008-06-17 15:40 ` [RFC PATCH 7/7] 802.11w: Configuration of MFP disabled/optional/required Jouni Malinen
2008-06-17 17:09   ` Johannes Berg
2008-06-17 18:18     ` Jouni Malinen
2008-06-17 18:34       ` Johannes Berg
2008-06-17 16:44 ` [RFC PATCH 0/7] IEEE 802.11w / management frame protection Johannes Berg
2008-06-17 17:47   ` Jouni Malinen
2008-06-17 17:52     ` Michael Buesch
2008-06-17 18:00       ` Johannes Berg
2008-06-17 18:23       ` Jouni Malinen
2008-06-17 18:27         ` Michael Buesch
2008-06-17 18:31           ` Johannes Berg
2008-06-17 18:41             ` Michael Buesch
2008-06-17 19:02 ` Jouni Malinen
2008-07-09 17:40 ` Johannes Berg
2008-07-09 18:08   ` Johannes Berg
2008-07-14 22:01     ` Jouni Malinen
2008-08-28 16:04     ` VLAN testing (and mac80211_hwsim test cases in general) Jouni Malinen
2008-08-29  7:33       ` Johannes Berg
2008-08-29  8:37         ` Jouni Malinen
2008-08-29 11:34           ` Jose Ignacio Naranjo Hernández

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=1213784268.1312.9.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=j@w1.fi \
    --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).