path: root/gsupplicant
diff options
authorPatrik Flykt <>2013-02-14 21:37:23 (GMT)
committerPatrik Flykt <>2013-02-18 08:49:32 (GMT)
commit6af0579c434058536fb40480f40f5e9895cfe863 (patch)
tree0d666deecef262f3914faca3229ce368463e575e /gsupplicant
parentab100ee868f8550ccd63893be2eb622c400bbfe2 (diff)
gsupplicant: Return zero for max scan SSID parameter
A driver can return a valid max scan SSID value of zero. Thus no fast scans can be done, so the code falls back to a simple scan instead. A value of zero is properly handled in plugins/wifi.c. An active scan for a hidden SSID adds only the SSID parameter to the wpa_supplicant D-Bus method call, which wpa_supplicant then handles properly. Some drivers also report a max scan SSID value of one. In some of the cases that value is bogus, the driver will not be able to do a fast scan anyway. In addition, it is questionable why only one SSID can be fast scanned as the feature would not differ much from an active scan for a hidden network. Thus we set the limit to two, i.e. zero or one is treated as zero, two or more is reported as is. Thanks to Grant Erickson and Tomasz Bursztyka for finding and pinpointing this issue. Fixes BMC#25971
Diffstat (limited to 'gsupplicant')
1 files changed, 2 insertions, 2 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index e298bb5..f33c2df 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -653,8 +653,8 @@ static void interface_capability(const char *key, DBusMessageIter *iter,
dbus_int32_t max_scan_ssid;
dbus_message_iter_get_basic(iter, &max_scan_ssid);
- if (max_scan_ssid < 1)
- max_scan_ssid = 1;
+ if (max_scan_ssid < 2)
+ max_scan_ssid = 0;
interface->max_scan_ssids = max_scan_ssid;
} else