On Tue, 2008-05-20 at 10:58 -0400, Stefanik Gábor wrote: > On Tue, May 20, 2008 at 10:27 AM, Johannes Berg > <johannes@xxxxxxxxxxxxxxxx> wrote: > > > >> - /* drop all data frame if we are not associated */ > >> - if ((!iwl3945_is_associated(priv) || > >> + /* drop all data frame if we are not associated and not monitoring */ > >> + if (((!iwl3945_is_associated(priv) && priv->iw_mode != > >> IEEE80211_IF_TYPE_MNTR) || > >> ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && !priv->assoc_id)) && > >> ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)) { > >> - IWL_DEBUG_DROP("Dropping - !iwl3945_is_associated\n"); > >> + IWL_DEBUG_DROP("Dropping - !iwl3945_is_associated outside monitor mode\n"); > >> goto drop_unlock; > >> } > > > > This makes injection not work when you're not exclusively in monitor > > mode. Yes, it may break the spec to be sending frames to an arbitrary > > station, but it's useful for all kinds of things including testing to > > have a monitor and a regular interface working at the same time. > > > > johannes > > > > What do you think is a better way to check if we have a monitor > interface? && priv->iw_mode == IEEE80211_IF_TYPE_STA? Or should this > be removed altogether? I tend to think it should be removed, in regular operation mac80211 would never create such a data frame, and when injecting you actually want it. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part