]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Fix the injection of protected broadcast frames
authorChaitanya T K <chaitanyatk@posedge.com>
Sat, 4 May 2013 08:36:28 +0000 (11:36 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 4 May 2013 08:36:28 +0000 (11:36 +0300)
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>

wlantest/inject.c

index ab8d11315ad81f47c5f2948c3eff636fd6e5673b..5b14ca7c65c902b7dd6c17339be3f42505d4fae2 100644 (file)
@@ -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;
        }