From: Johannes Berg <johannes@sipsolutions.net>
To: Bing Zhao <bzhao@marvell.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"John W. Linville" <linville@tuxdriver.com>,
Amitkumar Karwar <akarwar@marvell.com>,
Kiran Divekar <dkiran@marvell.com>,
Yogesh Powar <yogeshp@marvell.com>,
Marc Yang <yangyang@marvell.com>,
Frank Huang <frankh@marvell.com>, Jouni Malinen <j@w1.fi>
Subject: RE: [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2
Date: Tue, 05 Apr 2011 20:53:04 +0200 [thread overview]
Message-ID: <1302029584.4968.6.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <477F20668A386D41ADCC57781B1F704307FA911ED9@SC-VEXCH1.marvell.com>
Hi,
> > Ok Jouni and I just discussed this briefly, and it looks like there is
> > indeed a special case where the GTK is also set as the default TX key:
> > this case is when the station requested "no pairwise" or when the AP did
> > the same thing in the configuration.
>
> From the wpa_supplicant debug log generated by Amit, it seems that
> set_default_key() is called while installing PTK to the driver. Is it
> expected?
>
> WPA: Installing PTK to the driver.
> WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
> wpa_driver_nl80211_set_key: ifindex=12 alg=2 addr=0x80a7168 key_idx=0 set_tx=1 seq_len=6 key_len=32
> addr=00:1b:2f:55:79:7e
>
> The complete log file is attached for your reference.
Hmm. I'll need to look at that in more detail. But yeah, set_tx=1
indicates that it'll call set_default_key.
> > Is it possible that this just happens to be the case in your tests? It
> > looks like that would be rather strange, but that's a corner case where
> > the supplicant would possibly set the GTK as the default key.
>
> Not the same corner case. In our test both pairwise and groupwise are configured.
>
> >
> > In any case, this patch seems wrong in that you should never return
> > success if the operation actually failed.
>
> Could you please advise how we should resolve this?
What happens if you just reject the set_default_key and return -EINVAL
instead of 0?
johannes
next prev parent reply other threads:[~2011-04-05 18:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-02 1:36 [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2 Bing Zhao
2011-04-02 1:36 ` [PATCH 2/2] mwifiex: remove redundant encryption_mode mapping Bing Zhao
2011-04-03 8:02 ` [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2 Johannes Berg
2011-04-03 8:37 ` Johannes Berg
2011-04-05 18:45 ` Bing Zhao
2011-04-05 18:53 ` Johannes Berg [this message]
2011-04-05 23:22 ` Bing Zhao
2011-04-06 7:08 ` Johannes Berg
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=1302029584.4968.6.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=akarwar@marvell.com \
--cc=bzhao@marvell.com \
--cc=dkiran@marvell.com \
--cc=frankh@marvell.com \
--cc=j@w1.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=yangyang@marvell.com \
--cc=yogeshp@marvell.com \
/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).