mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Add debug print for no-enabled-networks case
If there are any disabled networks, show a debug print with the count of those networks when no enabled networks are found. This can be helpful in trying to figure out why scans are being skipped. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
b470b2bf37
commit
d4534bde9c
@ -83,15 +83,21 @@ static int wpas_wps_in_use(struct wpa_supplicant *wpa_s,
|
||||
int wpa_supplicant_enabled_networks(struct wpa_supplicant *wpa_s)
|
||||
{
|
||||
struct wpa_ssid *ssid = wpa_s->conf->ssid;
|
||||
int count = 0;
|
||||
int count = 0, disabled = 0;
|
||||
while (ssid) {
|
||||
if (!wpas_network_disabled(wpa_s, ssid))
|
||||
count++;
|
||||
else
|
||||
disabled++;
|
||||
ssid = ssid->next;
|
||||
}
|
||||
if (wpa_s->conf->cred && wpa_s->conf->interworking &&
|
||||
wpa_s->conf->auto_interworking)
|
||||
count++;
|
||||
if (count == 0 && disabled > 0) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "No enabled networks (%d disabled "
|
||||
"networks)", disabled);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user