aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-03-30 09:49:05 (GMT)
committerJouni Malinen <j@w1.fi>2013-03-30 09:49:05 (GMT)
commit2f9b66d3ab7aeb541eaa13113e7ff6971268b780 (patch)
tree313f4b0ecdcc0f9ee5fe950954ccdcfbb4de658b /wpa_supplicant
parent5126138c9e1a0120136a0db3db7d578009b95b15 (diff)
downloadhostap-2f9b66d3ab7aeb541eaa13113e7ff6971268b780.zip
hostap-2f9b66d3ab7aeb541eaa13113e7ff6971268b780.tar.gz
hostap-2f9b66d3ab7aeb541eaa13113e7ff6971268b780.tar.bz2
Extend ROAM command to handle multiple SSIDs per BSS
Select the BSS entry based on BSSID,SSID pairs instead of just BSSID to avoid selecting an unexpected SSID for the ROAM command. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/ctrl_iface.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 5bcf748..3f1111b 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -3513,7 +3513,13 @@ static int wpa_supplicant_ctrl_iface_roam(struct wpa_supplicant *wpa_s,
wpa_printf(MSG_DEBUG, "CTRL_IFACE ROAM " MACSTR, MAC2STR(bssid));
- bss = wpa_bss_get_bssid(wpa_s, bssid);
+ if (!ssid) {
+ wpa_printf(MSG_DEBUG, "CTRL_IFACE ROAM: No network "
+ "configuration known for the target AP");
+ return -1;
+ }
+
+ bss = wpa_bss_get(wpa_s, bssid, ssid->ssid, ssid->ssid_len);
if (!bss) {
wpa_printf(MSG_DEBUG, "CTRL_IFACE ROAM: Target AP not found "
"from BSS table");
@@ -3525,12 +3531,6 @@ static int wpa_supplicant_ctrl_iface_roam(struct wpa_supplicant *wpa_s,
* allow roaming to other networks
*/
- if (!ssid) {
- wpa_printf(MSG_DEBUG, "CTRL_IFACE ROAM: No network "
- "configuration known for the target AP");
- return -1;
- }
-
wpa_s->reassociate = 1;
wpa_supplicant_connect(wpa_s, bss, ssid);