]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Remove unnecessary validation code
authorJouni Malinen <j@w1.fi>
Fri, 17 Dec 2010 06:16:12 +0000 (08:16 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 17 Dec 2010 06:16:12 +0000 (08:16 +0200)
This condition is already checked above when figuring out whether a key
is known and as such, there is no point in keeping this check here.

wlantest/inject.c

index 20ec3442144fd57d0da954177a73e88469180d7e..51990e4306e3cc80c0cfe2745e67d025e9a36cab 100644 (file)
@@ -351,12 +351,6 @@ int wlantest_inject(struct wlantest *wt, struct wlantest_bss *bss,
                }
        }
 
-       if ((prot == WLANTEST_INJECT_PROTECTED ||
-            prot == WLANTEST_INJECT_INCORRECT_KEY) && !protect) {
-               wpa_printf(MSG_INFO, "Cannot protect injected frame");
-               return -1;
-       }
-
        if (protect)
                return wlantest_inject_prot(
                        wt, bss, sta, frame, len,