[PATCH] Fix the injection of protected broadcast frames

Chaitanya TK chaitanya.mgit
Thu May 2 04:52:27 PDT 2013



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 at posedge.com>
Signed-hostap: Chaitanya T K <chaitanyatk at posedge.com>
---
 wlantest/inject.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wlantest/inject.c b/wlantest/inject.c
index ab8d113..a868f21 100644
--- a/wlantest/inject.c
+++ b/wlantest/inject.c
@@ -286,8 +286,8 @@ int wlantest_inject(struct wlantest *wt, struct wlantest_bss *bss,
 	}
 
 	if (prot != WLANTEST_INJECT_UNPROTECTED &&
-	    (bss == NULL || sta == NULL)) {
-		wpa_printf(MSG_INFO, "No BSS/STA information to inject "
+	    bss == NULL) { /* STA can be NULL in case of Broadcast frames*/
+		wpa_printf(MSG_INFO, "No BSS information to inject "
 			   "protected frames");
 		return -1;
 	}






More information about the Hostap mailing list