From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <j@w1.fi>
Cc: linux-wireless@vger.kernel.org
Subject: Re: Management frame protection and packet injection from hostapd
Date: Tue, 17 Jun 2008 10:50:38 +0200 [thread overview]
Message-ID: <1213692638.3803.70.camel@johannes.berg> (raw)
In-Reply-To: <20080617073227.GA4974@jm.kir.nu>
[-- Attachment #1: Type: text/plain, Size: 2233 bytes --]
> I did.. I added another set of functions for default management key and
> did not remember to call the removal function from
> ieee80211_free_keys(). However, adding that call did not change
> anything.
Ok.
> It looks like we end up trying to remove the netdev directory in debugfs
> before removing the default key symlinks. Consequently, debugfs_remove()
> fails since there is still a file in the directory. This is what happens
> when removing the monitor interface:
>
> cfg.c: ieee80211_del_iface() ->
> iface.c: ieee80211_if_remove() ->
> iface.c: __ieee80211_if_del() ->
> debugfs_netdev.c: ieee80211_debugfs_remove_netdev()
> [too early; symlink still there]
> unregister_netdevice(dev) -> [dev->uninit]
> iface.c: ieee80211_if_reinit() ->
> key.c: ieee80211_free_keys() ->
> debugfs_key.c: ieee80211_debugfs_key_remove_default()
>
>
> Any idea how to fix this?
Hmm, no, no idea at all. To be honest, I don't fully understand
interface lifetime rules and I think many of those functions are
probably misnamed. I.e. why is the _reinit function assigned to the
->uninit callback? Much of that either comes from the original
Devicescape code or what Jiri did to it, and I never bothered to clean
it up.
> Why is ieee80211_debugfs_remove_netdev() call
> in __ieee80211_if_del()?
I don't really know. Probably because that's where Jiri had the sysfs
code I converted to debugfs ;)
> Could it be moved into ieee80211_if_reinit(),
> so that it would happen only after the ieee80211_free_keys() call?
That's well possible, I guess you'd have to try.
> Since
> ieee80211_if_reinit() is called from other places, too, it might be
> cleaner to define a new dev->uninit function that is a wrapper for call
> to ieee80211_if_reinit() followed by call to
> ieee80211_debugfs_remove_netdev().. However, since ieee80211_if_reinit()
> calls ieee80211_if_sdata_deinit(), it might be necessary to call
> ieee80211_debugfs_remove_netdev() before this call (or from it?); I did
> not yet look into details of what would be the required order for these.
I really don't know either. If you feel motivated to clean up the
interface handling I'd appreciate it.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2008-06-17 8:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-16 14:33 Management frame protection and packet injection from hostapd Jouni Malinen
2008-06-16 14:53 ` Johannes Berg
2008-06-16 15:34 ` Jouni Malinen
2008-06-16 16:44 ` Johannes Berg
2008-06-16 16:47 ` Johannes Berg
2008-06-17 7:32 ` Jouni Malinen
2008-06-17 8:50 ` Johannes Berg [this message]
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=1213692638.3803.70.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