diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2013-11-06 22:01:48 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2013-11-06 22:12:30 (GMT) |
commit | 50589751bf7b9e70ee6bf9b1ce8212b311cf971c (patch) | |
tree | d793fac0dd6d04793a9eab07b36ed9fad6f6e5ca /wpa_supplicant/interworking.c | |
parent | 6a0b400273a9561d45f3c216b980f2a38e2a48e7 (diff) | |
download | hostap-50589751bf7b9e70ee6bf9b1ce8212b311cf971c.zip hostap-50589751bf7b9e70ee6bf9b1ce8212b311cf971c.tar.gz hostap-50589751bf7b9e70ee6bf9b1ce8212b311cf971c.tar.bz2 |
Interworking: Reject BSS based on disallow_aps
If a BSS is disallowed temporarily with disallow_aps, the network
connection is going to fail. As such, there is not much point in
allowing Interworking network selection to try to connect with such BSS.
As such, do not consider disallowed networks for automatic network
selection and reject requests to connect to them through
INTERWORKING_CONNECT.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/interworking.c')
-rw-r--r-- | wpa_supplicant/interworking.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index ffb3cb3..6f50c97 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -1267,6 +1267,12 @@ int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss) if (wpa_s->conf->cred == NULL || bss == NULL) return -1; + if (disallowed_bssid(wpa_s, bss->bssid) || + disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) { + wpa_printf(MSG_DEBUG, "Interworking: Reject connection to disallowed BSS " + MACSTR, MAC2STR(bss->bssid)); + return -1; + } ie = wpa_bss_get_ie(bss, WLAN_EID_SSID); if (ie == NULL || ie[1] == 0) { wpa_printf(MSG_DEBUG, "Interworking: No SSID known for " @@ -1597,6 +1603,13 @@ static struct wpa_cred * interworking_credentials_available( { struct wpa_cred *cred, *cred2; + if (disallowed_bssid(wpa_s, bss->bssid) || + disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) { + wpa_printf(MSG_DEBUG, "Interworking: Ignore disallowed BSS " + MACSTR, MAC2STR(bss->bssid)); + return NULL; + } + cred = interworking_credentials_available_realm(wpa_s, bss); cred2 = interworking_credentials_available_3gpp(wpa_s, bss); if (cred && cred2 && cred2->priority >= cred->priority) @@ -1883,6 +1896,9 @@ static void interworking_next_anqp_fetch(struct wpa_supplicant *wpa_s) ie = wpa_bss_get_ie(bss, WLAN_EID_EXT_CAPAB); if (ie == NULL || ie[1] < 4 || !(ie[5] & 0x80)) continue; /* AP does not support Interworking */ + if (disallowed_bssid(wpa_s, bss->bssid) || + disallowed_ssid(wpa_s, bss->ssid, bss->ssid_len)) + continue; /* Disallowed BSS */ if (!(bss->flags & WPA_BSS_ANQP_FETCH_TRIED)) { if (bss->anqp == NULL) { |