[PATCH] nl80211: Run TKIP countermeasures in correct hostapd_data context
Simon Wunderlich
simon
Fri Dec 7 03:23:23 PST 2012
Hello Ben,
> On 11/23/2012 03:00 AM, Sven Eckelmann wrote:
> > hostapd can run with different VIF when using nl80211. Events about MIC
> > failures have to be processed in context of the VIF which received it and
> > not in context of the primary VIF. Otherwise the station belonging to
> > this VIF may not be found in the primary VIF station hash and therefore
> > no countermeasures are started or the countermeasures are started for
> > the wrong VIF.
> >
> > Signed-off-by: Sven Eckelmann <sven at open-mesh.com>
> > Signed-off-by: Simon Wunderlich <simon at open-mesh.com>
> > ---
> > It looks more of these events are processed with the wrong hostapd_data
> > contexts. Any ideas/suggestion how to cleanly fix this problem once and
> > for all?
>
> I think we should start adding type-safety and quit passing void*
> pointers where possible. If we do have to pass generic data structs
> around, the struct could have a 'type' field that could be queried by
> any code that wishes to cast from one type to another. We could at
> least have run-time checks in that case. Basically, poor-man's
> c++ class hierarchy in c.
I agree with you that (a little bit of) type safety would be a good thing.
However, this should be applied in all over hostap in a separate patch - I
think our original patch should be applied, and changing types should be added
by someone who knows all the internals of hostap. :)
Thanks,
Simon
More information about the Hostap
mailing list