From 409cd147b7a0685cbcae180c4d81526dd10b9159 Mon Sep 17 00:00:00 2001 From: Chaitanya T K Date: Sat, 4 May 2013 11:36:28 +0300 Subject: [PATCH] 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 Signed-hostap: Chaitanya T K --- wlantest/inject.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wlantest/inject.c b/wlantest/inject.c index ab8d11315..5b14ca7c6 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; }