Q: wpa_supplicant/scan.c: num_ssids+

Holger Schurig hs4233
Thu Sep 10 00:07:34 PDT 2009

On Thursday 10 September 2009 00:06:04 Jouni Malinen wrote:
> > 1. Is the debug text simply misleading?  In my case, ssid is
> > NULL, so the else-part is taken. Here it babbles something
> > about a wildcard SSID scan, which is wrong.
> I do not follow.. Your configuration is using scan_ssid=1
> which means it should be setting ssid. 

Yes, ssid is set. But after this code block:

  while (ssid) {
     ssid = ssid->next;

ssid is definitely is NULL (assuming only one network block, so
that the "break" inside the loop isn't taken). And therefore the 

  if (ssid) {
     ... true-code ...
  } else {
     ... false-code ...

seems bogus to me. This means: If there is only one 
network-block, always do an unspecific SSID scan. Can this be 
what was intended?

Also, before entering the else-part, params.num_ssids was 1. And 
the while() loop set up to scan for SSID "TEST". Now the else 
part does 

  wpa_s->prev_scan_ssid = WILDCARD_SSID_SCAN;

Here two things happen: for all drivers that set max_ssids=1, 
the "params.num_ssids++" is a NOOP.

And for all drivers, where this is a NOOP, 
the "wpa_s->prev_scan_ssid = WILDCARD_SSID_SCAN" is wrong. The 
driver has been asked *NOT* to scan a wildcard ssid, but to scan 
for a specific SSID (in the while()-block).

I hope that I didn't confuse things too much :-)


More information about the Hostap mailing list