diff --git a/wlantest/inject.c b/wlantest/inject.c index 399f1a3c0..b177bcfd9 100644 --- a/wlantest/inject.c +++ b/wlantest/inject.c @@ -83,17 +83,17 @@ static int wlantest_inject_bip(struct wlantest *wt, struct wlantest_bss *bss, u8 *frame, size_t len, int incorrect_key) { u8 *prot; - u8 dummy[32]; + u8 stub[32]; int ret; size_t plen; if (!bss->igtk_len[bss->igtk_idx]) return -1; - os_memset(dummy, 0x11, sizeof(dummy)); + os_memset(stub, 0x11, sizeof(stub)); inc_byte_array(bss->ipn[bss->igtk_idx], 6); - prot = bip_protect(incorrect_key ? dummy : bss->igtk[bss->igtk_idx], + prot = bip_protect(incorrect_key ? stub : bss->igtk[bss->igtk_idx], bss->igtk_len[bss->igtk_idx], frame, len, bss->ipn[bss->igtk_idx], bss->igtk_idx, &plen); @@ -115,7 +115,7 @@ static int wlantest_inject_prot_bc(struct wlantest *wt, u8 *crypt; size_t crypt_len; int ret; - u8 dummy[64]; + u8 stub[64]; u8 *pn; struct ieee80211_hdr *hdr; u16 fc; @@ -134,14 +134,14 @@ static int wlantest_inject_prot_bc(struct wlantest *wt, pn = bss->rsc[bss->gtk_idx]; inc_byte_array(pn, 6); - os_memset(dummy, 0x11, sizeof(dummy)); + os_memset(stub, 0x11, sizeof(stub)); if (bss->group_cipher == WPA_CIPHER_TKIP) - crypt = tkip_encrypt(incorrect_key ? dummy : + crypt = tkip_encrypt(incorrect_key ? stub : bss->gtk[bss->gtk_idx], frame, len, hdrlen, NULL, pn, bss->gtk_idx, &crypt_len); else - crypt = ccmp_encrypt(incorrect_key ? dummy : + crypt = ccmp_encrypt(incorrect_key ? stub : bss->gtk[bss->gtk_idx], frame, len, hdrlen, NULL, pn, bss->gtk_idx, &crypt_len); @@ -163,7 +163,7 @@ static int wlantest_inject_prot(struct wlantest *wt, struct wlantest_bss *bss, u8 *crypt; size_t crypt_len; int ret; - u8 dummy[64]; + u8 stub[64]; u8 *pn; struct ieee80211_hdr *hdr; u16 fc; @@ -243,17 +243,17 @@ static int wlantest_inject_prot(struct wlantest *wt, struct wlantest_bss *bss, pn = sta->rsc_tods[tid]; inc_byte_array(pn, 6); - os_memset(dummy, 0x11, sizeof(dummy)); + os_memset(stub, 0x11, sizeof(stub)); if (tk) - crypt = ccmp_encrypt(incorrect_key ? dummy : tk, + crypt = ccmp_encrypt(incorrect_key ? stub : tk, frame, len, hdrlen, qos, pn, 0, &crypt_len); else if (sta->pairwise_cipher == WPA_CIPHER_TKIP) - crypt = tkip_encrypt(incorrect_key ? dummy : sta->ptk.tk, + crypt = tkip_encrypt(incorrect_key ? stub : sta->ptk.tk, frame, len, hdrlen, qos, pn, 0, &crypt_len); else - crypt = ccmp_encrypt(incorrect_key ? dummy : sta->ptk.tk, + crypt = ccmp_encrypt(incorrect_key ? stub : sta->ptk.tk, frame, len, hdrlen, qos, pn, 0, &crypt_len);