aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-05-07 10:39:33 (GMT)
committerJouni Malinen <j@w1.fi>2012-05-07 10:39:33 (GMT)
commitfea7c3a0558787d6cc89b93207a612607f04d665 (patch)
tree20d9362358b4483711f256c0efab5976b5860491 /wpa_supplicant/events.c
parentd90134e74848d1ee090a3e6199599f355214586e (diff)
downloadhostap-fea7c3a0558787d6cc89b93207a612607f04d665.zip
hostap-fea7c3a0558787d6cc89b93207a612607f04d665.tar.gz
hostap-fea7c3a0558787d6cc89b93207a612607f04d665.tar.bz2
Ignore network blocks that have invalid WEP key length
Do not try to associate with a network that has an invalid or incomplete configuration because the association or at least data connection would fail anyway. This commits adds a common function for checking whether a network block is disabled to make it easier to check network blocks without having to reject them during configuration file parsing (which would prevent wpa_supplicant from starting). The only additional check added in this commit is to verify the WEP key length. Similar checks for other parameters can be added in future commits. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 54705af..8031936 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -57,7 +57,7 @@ static int wpa_supplicant_select_config(struct wpa_supplicant *wpa_s)
return -1;
}
- if (ssid->disabled) {
+ if (wpas_network_disabled(ssid)) {
wpa_dbg(wpa_s, MSG_DEBUG, "Selected network is disabled");
return -1;
}
@@ -640,7 +640,7 @@ static struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
for (ssid = group; ssid; ssid = ssid->pnext) {
int check_ssid = wpa ? 1 : (ssid->ssid_len != 0);
- if (ssid->disabled) {
+ if (wpas_network_disabled(ssid)) {
wpa_dbg(wpa_s, MSG_DEBUG, " skip - disabled");
continue;
}
@@ -876,7 +876,7 @@ wpa_supplicant_pick_new_network(struct wpa_supplicant *wpa_s)
for (prio = 0; prio < wpa_s->conf->num_prio; prio++) {
for (ssid = wpa_s->conf->pssid[prio]; ssid; ssid = ssid->pnext)
{
- if (ssid->disabled)
+ if (wpas_network_disabled(ssid))
continue;
if (ssid->mode == IEEE80211_MODE_IBSS ||
ssid->mode == IEEE80211_MODE_AP)