aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorChaitanya T K <chaitanyatk@posedge.com>2013-05-04 08:36:28 (GMT)
committerJouni Malinen <j@w1.fi>2013-05-04 08:36:28 (GMT)
commit409cd147b7a0685cbcae180c4d81526dd10b9159 (patch)
tree7176076c2fd63032b6277ef28a2c4311b39523ef /wlantest
parentb691dcb129b09d42a1740a1706d28bc6562e7fa0 (diff)
downloadhostap-409cd147b7a0685cbcae180c4d81526dd10b9159.zip
hostap-409cd147b7a0685cbcae180c4d81526dd10b9159.tar.gz
hostap-409cd147b7a0685cbcae180c4d81526dd10b9159.tar.bz2
wlantest: Fix the injection of protected broadcast frames
Injecting protected broadcast frames fails because of the unnecessary null check for sta. In case of broadcast frames sta can be null, so remove the check. Reported-by: Janardhan R <janardhanr@posedge.com> Signed-hostap: Chaitanya T K <chaitanyatk@posedge.com>
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/inject.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/wlantest/inject.c b/wlantest/inject.c
index ab8d113..5b14ca7 100644
--- a/wlantest/inject.c
+++ b/wlantest/inject.c
@@ -285,9 +285,8 @@ int wlantest_inject(struct wlantest *wt, struct wlantest_bss *bss,
return -1;
}
- if (prot != WLANTEST_INJECT_UNPROTECTED &&
- (bss == NULL || sta == NULL)) {
- wpa_printf(MSG_INFO, "No BSS/STA information to inject "
+ if (prot != WLANTEST_INJECT_UNPROTECTED && bss == NULL) {
+ wpa_printf(MSG_INFO, "No BSS information to inject "
"protected frames");
return -1;
}