Very long wpa_supplicant startup time - Win2K Pro

Jouni Malinen jkmaline
Wed Aug 17 19:52:30 PDT 2005


On Tue, Aug 16, 2005 at 01:32:30PM -0400, Bryan Kadzban wrote:

> In short: 2000 Pro can probably be added to the "the NDIS driver works
> with..." list.

Thanks for reporting this! I have received somewhat conflicting reports
with Win2k, but it is starting to sound like that there are no critical
issues for it.

> However, we are having one issue.  I'm starting wpa_supplicant from a
> self-written wrapper service, so that the machine has a network before
> the login prompt comes up.

> The issue is that there's a delay of about 30 seconds between the time
> my service starts and the time that wpa_supplicant logs its first message.

I'm not familiar with the order in which Windows starts up various
services. I haven't certainly seen this, but then again, I have never
tried starting wpa_supplicant as a service either. I would guess that
some part of the WinPcap and/or packet.dll is not available at this
point.

> I have added -dt to the wpa_supplicant command line, to have timestamps
> on the debug messages.  I also added some code to my wrapper service to
> log the time that the CreateProcess call (starting up wpa_supplicant)
> returns.  Finally, I added a line to wpa_supplicant's main() function to
> log the time that it starts executing.

Do you have this time before the call to WSAStartup()? It is possible
that WinSock is not available that early in the bootup sequence and that
call could be blocking..

> Since this delay happens before main() even starts, it doesn't even
> appear to be caused by code in wpa_supplicant.  I'm thinking it may have
> something to do with packet.dll or wpcap.dll (since wpa_supplicant links
> to them), but I don't know for sure.  Anything I can try to find out?

I would do following tests to get a bit more exact understanding on
where this delay is coming from:
1) use your wrapper service to start a simple program that is just
   writing the current timestamp in main()
2) build the simple program with wpcap and packet libraries linked in
3) try linking in ws2_32 library
4) add call to WSAStartup() and print timestamp after that
5) link in remaining libraries wpa_supplicant is using (ssl, crypto,
   gdi32, crypt32)

I would expect either the second or the fourth option to get the same
delay that you are seeing with wpa_supplicant.

> Is this maybe a known issue with winpcap?  (I'm thinking I need to ask
> the winpcap people about that, but first I want to make sure the problem
> is coming from their DLL, if that's possible.)

It may be known for someone, but not for me ;-).  If the test program
mentioned above shows the same behavior with step 2, I would indeed go
asking this from WinPcap developers.

-- 
Jouni Malinen                                            PGP id EFC895FA




More information about the Hostap mailing list