* [PATCH] hostapd: don't reference ieee80211_msg_sta_not_assoc if it's unused anyway
@ 2007-08-10 21:38 Johannes Berg
2007-08-15 3:40 ` Jouni Malinen
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2007-08-10 21:38 UTC (permalink / raw)
To: Jouni Malinen; +Cc: linux-wireless
Hostapd doesn't do anything about such frames. Kernel no longer sends
them and the constant was removed, so let's not reference it any longer.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
--- hostap.orig/hostapd/driver_devicescape.c 2007-08-10 23:33:19.000000000 +0200
+++ hostap/hostapd/driver_devicescape.c 2007-08-10 23:35:10.000000000 +0200
@@ -1351,9 +1351,12 @@ static void handle_frame(struct hostapd_
}
/* PS-Poll frame from not associated is 16 bytes. All other frames
- * passed to hostapd are 24 bytes or longer. */
- if (len < 24 &&
- (msg_type != ieee80211_msg_sta_not_assoc || len < 16)) {
+ * passed to hostapd are 24 bytes or longer.
+ * Right now, the kernel doesn't send us any frames from not-associated
+ * because the code here doesn't care. TODO: add support to kernel
+ * and send DEAUTH/DISASSOC to them...
+ */
+ if (len < 24) {
printf("handle_frame: too short (%lu), type %d\n",
(unsigned long) len, msg_type);
return;
@@ -1425,9 +1428,15 @@ static void handle_frame(struct hostapd_
case ieee80211_msg_michael_mic_failure:
hostapd_michael_mic_failure(hapd, buf, data_len);
return;
- case ieee80211_msg_sta_not_assoc:
- /* TODO: ieee802_11_rx_sta_not_assoc(hapd, buf, data_len); */
+/*
+ * TODO
+ * We should be telling them to go away. But we don't support that now.
+ * See also below and above for other TODO items related to this.
+
+ case ieee80211_msg_sta_not_assoc:
+ ieee802_11_rx_sta_not_assoc(hapd, buf, data_len);
return;
+ */
default:
printf("handle_frame: unknown msg_type %d\n", msg_type);
return;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hostapd: don't reference ieee80211_msg_sta_not_assoc if it's unused anyway
2007-08-10 21:38 [PATCH] hostapd: don't reference ieee80211_msg_sta_not_assoc if it's unused anyway Johannes Berg
@ 2007-08-15 3:40 ` Jouni Malinen
2007-08-15 10:48 ` Johannes Berg
0 siblings, 1 reply; 4+ messages in thread
From: Jouni Malinen @ 2007-08-15 3:40 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On Fri, Aug 10, 2007 at 11:38:01PM +0200, Johannes Berg wrote:
> Hostapd doesn't do anything about such frames. Kernel no longer sends
> them and the constant was removed, so let's not reference it any longer.
This is not good.. We should really make sure that deauth/disassoc is
sent out at proper time to avoid clients getting stuck believing that
they are associated.
Why does the kernel no longer send this notification? The current
wireless-dev.git seems to have this still in use and as such, I have not
applied this change into hostapd and would rather not apply it either,
i.e., if there is some need for getting rid of
ieee80211_msg_sta_not_assoc, I would like to see it being done by
providing similar functionality by some other means, not by just
removing this.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hostapd: don't reference ieee80211_msg_sta_not_assoc if it's unused anyway
2007-08-15 3:40 ` Jouni Malinen
@ 2007-08-15 10:48 ` Johannes Berg
2007-08-16 2:05 ` Jouni Malinen
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2007-08-15 10:48 UTC (permalink / raw)
To: Jouni Malinen; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]
On Tue, 2007-08-14 at 20:40 -0700, Jouni Malinen wrote:
> On Fri, Aug 10, 2007 at 11:38:01PM +0200, Johannes Berg wrote:
> > Hostapd doesn't do anything about such frames. Kernel no longer sends
> > them and the constant was removed, so let's not reference it any longer..
>
> This is not good.. We should really make sure that deauth/disassoc is
> sent out at proper time to avoid clients getting stuck believing that
> they are associated.
I know we should, but I regard this as a bit of a chicken and egg
problem. Right now, hostapd doesn't care, but the kernel sends those
notifications. So I could remove it from the kernel without anybody ever
noticing.
> Why does the kernel no longer send this notification? The current
> wireless-dev.git seems to have this still in use and as such, I have not
> applied this change into hostapd and would rather not apply it either,
> i.e., if there is some need for getting rid of
> ieee80211_msg_sta_not_assoc, I would like to see it being done by
> providing similar functionality by some other means, not by just
> removing this.
The reason for removing all the ieee80211_msg_* constants is that I'd
really love to be able to get rid of the prism2 header hack in there. By
removing it from both sides I've only slightly extended the TODO from
"fix this in hostapd" to "add API to the kernel and use it in hostapd"
which I thought appropriate.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hostapd: don't reference ieee80211_msg_sta_not_assoc if it's unused anyway
2007-08-15 10:48 ` Johannes Berg
@ 2007-08-16 2:05 ` Jouni Malinen
0 siblings, 0 replies; 4+ messages in thread
From: Jouni Malinen @ 2007-08-16 2:05 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On Wed, Aug 15, 2007 at 12:48:44PM +0200, Johannes Berg wrote:
> The reason for removing all the ieee80211_msg_* constants is that I'd
> really love to be able to get rid of the prism2 header hack in there. By
> removing it from both sides I've only slightly extended the TODO from
> "fix this in hostapd" to "add API to the kernel and use it in hostapd"
> which I thought appropriate.
OK. I applied both this and the ieee80211_msg_key_threshold_notification
changes. I'm not really fond of that extra header hack either, it just
seemed to be only reasonable option at the time. As far the management
interface itself is concerned, I haven't been convinced of its badness,
but anyway, as far as these two notification events are concerned, there
is not much need for providing the full frame to user space and another
API would be perfectly fine for them.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-16 2:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-10 21:38 [PATCH] hostapd: don't reference ieee80211_msg_sta_not_assoc if it's unused anyway Johannes Berg
2007-08-15 3:40 ` Jouni Malinen
2007-08-15 10:48 ` Johannes Berg
2007-08-16 2:05 ` Jouni Malinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox