Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: allow key deletion for mesh interface
@ 2013-06-18  4:07 Chun-Yeow Yeoh
  2013-06-18  7:31 ` Johannes Berg
  2013-06-18  9:39 ` Johannes Berg
  0 siblings, 2 replies; 8+ messages in thread
From: Chun-Yeow Yeoh @ 2013-06-18  4:07 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, linville, devel, Chun-Yeow Yeoh

This is to support key deletion for mesh interface, especially
to be used for key which is not deleted even with the deletion
of peer mesh station.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
---
 net/mac80211/cfg.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 64cf294..6ff3414 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -239,7 +239,10 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev,
 	if (mac_addr) {
 		ret = -ENOENT;
 
-		sta = sta_info_get_bss(sdata, mac_addr);
+		if (ieee80211_vif_is_mesh(&sdata->vif))
+			sta = sta_info_get(sdata, mac_addr);
+		else
+			sta = sta_info_get_bss(sdata, mac_addr);
 		if (!sta)
 			goto out_unlock;
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* Re: [PATCH] mac80211: allow key deletion for mesh interface
@ 2013-06-18  8:14 Yeoh Chun-Yeow
  2013-06-18  9:07 ` Yeoh Chun-Yeow
  0 siblings, 1 reply; 8+ messages in thread
From: Yeoh Chun-Yeow @ 2013-06-18  8:14 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linux-wireless@vger.kernel.org, John Linville,
	devel@lists.open80211s.org

In the ieee80211_free_sta_keys, the key idx 4 is not deleted, since it
is limited by NUM_DEFAULT_KEYS.

----
Chun-Yeow

On Tue, Jun 18, 2013 at 3:56 PM, Yeoh Chun-Yeow <yeohchunyeow@gmail.com> wrote:
> In authsae, we have a GTK with key index 4 as follow:
> install_key(&nlcfg, peer, CIPHER_AES_CMAC, NL80211_KEYTYPE_GROUP, 4, peer_mgtk);
>
> We may need to delete this key while doing re-authentication for the
> same peer mesh STA due to accidental reboot. Otherwise, this GTK key
> is not deleted.
>
> ---
> Chun-Yeow
>
> On Tue, Jun 18, 2013 at 3:31 PM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
>> On Tue, 2013-06-18 at 12:07 +0800, Chun-Yeow Yeoh wrote:
>>> This is to support key deletion for mesh interface, especially
>>> to be used for key which is not deleted even with the deletion
>>> of peer mesh station.
>>
>> Can you explain which keys in mesh aren't deleted? It seems the
>> per-station keys would be deleted when the station is deleted, and
>> something like "GTK" would be deleted when leaving the mesh?
>>
>> johannes
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-18 12:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18  4:07 [PATCH] mac80211: allow key deletion for mesh interface Chun-Yeow Yeoh
2013-06-18  7:31 ` Johannes Berg
2013-06-18  9:39 ` Johannes Berg
2013-06-18 12:05   ` Yeoh Chun-Yeow
  -- strict thread matches above, loose matches on Subject: below --
2013-06-18  8:14 Yeoh Chun-Yeow
2013-06-18  9:07 ` Yeoh Chun-Yeow
2013-06-18  9:36   ` Johannes Berg
2013-06-18  9:37     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox