aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_glue.c
diff options
context:
space:
mode:
authorPurushottam Kushwaha <pkushwah@codeaurora.org>2018-03-12 14:44:48 (GMT)
committerJouni Malinen <j@w1.fi>2018-03-12 22:32:43 (GMT)
commitf8bfc9cbded0326e40805e916c208960e61049f6 (patch)
tree4c086595f64d1e06f8b0a279d079e95ab2e642d9 /src/ap/wpa_auth_glue.c
parentcce16e43f80be6f14365e1141a7d19520983e09f (diff)
downloadhostap-f8bfc9cbded0326e40805e916c208960e61049f6.zip
hostap-f8bfc9cbded0326e40805e916c208960e61049f6.tar.gz
hostap-f8bfc9cbded0326e40805e916c208960e61049f6.tar.bz2
Use correct WPA_ALG_* values to compare for enum wpa_alg
enum wpa_alg was being compared with WPA_CIPHER_* values. That does not work here and strict compilers will report this as an error. Fix the comparision to use proper WPA_ALG_* values. This fixes testing capability for resetting IPN for BIP. Fixes: 16579769ff7b ("Add testing functionality for resetting PN/IPN for configured keys") Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'src/ap/wpa_auth_glue.c')
-rw-r--r--src/ap/wpa_auth_glue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index e2a4201..afc10f9 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -365,10 +365,10 @@ static int hostapd_wpa_auth_set_key(void *ctx, int vlan_id, enum wpa_alg alg,
sta->last_tk_len = key_len;
}
#ifdef CONFIG_IEEE80211W
- } else if (alg == WPA_CIPHER_AES_128_CMAC ||
- alg == WPA_CIPHER_BIP_GMAC_128 ||
- alg == WPA_CIPHER_BIP_GMAC_256 ||
- alg == WPA_CIPHER_BIP_CMAC_256) {
+ } else if (alg == WPA_ALG_IGTK ||
+ alg == WPA_ALG_BIP_GMAC_128 ||
+ alg == WPA_ALG_BIP_GMAC_256 ||
+ alg == WPA_ALG_BIP_CMAC_256) {
hapd->last_igtk_alg = alg;
hapd->last_igtk_key_idx = idx;
if (key)