Double disconnect event

Dmitry Shmidt dimitrysh at google.com
Mon Mar 8 15:27:22 EST 2010


Hi Jouni,

How double-disconnect event may cause the problem?
Let's assume we are switching from one network (AP) to another.
What I see that we got first DISCONNECT event, then ASSOCIATING, and then we
may get another DISCONNECT event.
It happens probably because single-threaded wpa_supplicant can process
messages when it can.
Network manager get first DISCONNECT event and schedules to do something.
Then it gets another one (the same actually from network perspective) and
schedules another "disconnect" procedure that may take place after we were
already associated with another network.

So my point is that double-disconnect event doesn't help the system to be
more robust. You may raise an objection that network manager should take
care of it. But there is no way for network manager to know if it is "old"
DISCONNECT or new one when we failed with new network.

Thanks,

Dmitry

On Sat, Mar 6, 2010 at 1:01 AM, Jouni Malinen <j at w1.fi> wrote:

> On Mon, Feb 22, 2010 at 03:41:51PM -0800, Dmitry Shmidt wrote:
>
> > Working with several WEXT-supported driver I see that they are sending
> > SIOCGIWAP event
> > (DISASSOCIATE) for both DISASSOCIATE and DEAUTHENTICATE internal driver
> events
> > by using
> >   wireless_send_event(SIOCGIWAP);
> >
> > In case of AP with no security it will be just one message, but
> > otherwise it will send the message twice.
> > driver_wext.c event handling will call
> >    wpa_supplicant_event(ctx, EVENT_DISASSOC, NULL);
> > twice for each of driver's events with small delay.
>
> This sounds reasonable.
>
> > It is not a big deal for wpa_supplicant itself but it may confuse
> > network manager.
>
> Could you please provide more details on why and how this would confuse
> network manager?
>
> > Will it be "safe" to suppress the second message on driver_wext.c layer?
> > Am I missing something?
>
> Whether it is safe or not, I'm missing details on why it would be
> desirable to suppress the second event.. ;-) Unless a clear issue can be
> identified, I would rather not make wpa_supplicant filter events in this
> way.
>
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20100308/23e91f59/attachment.htm 


More information about the HostAP mailing list