aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/ctrl.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-21 11:19:43 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-21 11:19:43 (GMT)
commit221519dea30870c35d7a67cfd9eb7fbce5daa681 (patch)
tree87bef8b2ec53d80d7847c7a9b761b4819bb53bfc /wlantest/ctrl.c
parent81d59891769e4e9335025e304bb4b4bb1fcd65b4 (diff)
downloadhostap-221519dea30870c35d7a67cfd9eb7fbce5daa681.zip
hostap-221519dea30870c35d7a67cfd9eb7fbce5daa681.tar.gz
hostap-221519dea30870c35d7a67cfd9eb7fbce5daa681.tar.bz2
wlantest: Derive PMK to existing BSSes when a new passphrase is added
Diffstat (limited to 'wlantest/ctrl.c')
-rw-r--r--wlantest/ctrl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/wlantest/ctrl.c b/wlantest/ctrl.c
index ac6efe9..76dd408 100644
--- a/wlantest/ctrl.c
+++ b/wlantest/ctrl.c
@@ -726,8 +726,16 @@ static void ctrl_add_passphrase(struct wlantest *wt, int sock, u8 *cmd,
}
}
- if (p)
+ if (p) {
+ struct wlantest_bss *bss;
dl_list_add(&wt->passphrase, &p->list);
+ dl_list_for_each(bss, &wt->bss, struct wlantest_bss, list) {
+ if (bssid &&
+ os_memcmp(p->bssid, bss->bssid, ETH_ALEN) != 0)
+ continue;
+ bss_add_pmk_from_passphrase(bss, p->passphrase);
+ }
+ }
ctrl_send_simple(wt, sock, WLANTEST_CTRL_SUCCESS);
}