[PATCH] nl80211: Run TKIP countermeasures in correct hostapd_data context

Ben Greear greearb
Wed Nov 28 08:34:16 PST 2012


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.

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com





More information about the Hostap mailing list