aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/ctrl.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-08-28 16:19:38 (GMT)
committerJouni Malinen <j@w1.fi>2011-08-28 16:19:38 (GMT)
commit02b915f689d4e53ce1a09636d5b416209396c889 (patch)
treedecea784f8d0d0650d72aecf5340a97c1f86b433 /wlantest/ctrl.c
parent17f6b9005641c9c44f55cda825b3a170ffa8ff04 (diff)
downloadhostap-02b915f689d4e53ce1a09636d5b416209396c889.zip
hostap-02b915f689d4e53ce1a09636d5b416209396c889.tar.gz
hostap-02b915f689d4e53ce1a09636d5b416209396c889.tar.bz2
wlantest: Allow injection of unprotected frames to unknown BSS
Diffstat (limited to 'wlantest/ctrl.c')
-rw-r--r--wlantest/ctrl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/wlantest/ctrl.c b/wlantest/ctrl.c
index 2e470dd..2132b2b 100644
--- a/wlantest/ctrl.c
+++ b/wlantest/ctrl.c
@@ -1154,14 +1154,17 @@ static void ctrl_send_(struct wlantest *wt, int sock, u8 *cmd, size_t clen)
}
bss = bss_find(wt, bssid);
- if (bss == NULL) {
+ if (bss == NULL && prot != WLANTEST_INJECT_UNPROTECTED) {
wpa_printf(MSG_INFO, "Unknown BSSID");
ctrl_send_simple(wt, sock, WLANTEST_CTRL_FAILURE);
return;
}
- sta = sta_find(bss, sta_addr);
- if (sta == NULL) {
+ if (bss)
+ sta = sta_find(bss, sta_addr);
+ else
+ sta = NULL;
+ if (sta == NULL && prot != WLANTEST_INJECT_UNPROTECTED) {
wpa_printf(MSG_INFO, "Unknown STA address");
ctrl_send_simple(wt, sock, WLANTEST_CTRL_FAILURE);
return;