From 86f9b1c70607b6ea6a507951af6e3010801bb134 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 23 Jan 2015 16:47:53 +0200 Subject: [PATCH] nl80211: Fix default group key management index configuration The correct nl80211 flag for group key management cipher was set only for BIP (AES-CMAC-128). The same flag needs to be used with the newer ciphers BIP-CMAC-256, BIP-GMAC-128, and BIP-GMAC-256. Signed-off-by: Jouni Malinen --- src/drivers/driver_nl80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 709536a3f..f955ee4f0 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -2493,7 +2493,10 @@ static int wpa_driver_nl80211_set_key(const char *ifname, struct i802_bss *bss, msg = nl80211_ifindex_msg(drv, ifindex, 0, NL80211_CMD_SET_KEY); if (!msg || nla_put_u8(msg, NL80211_ATTR_KEY_IDX, key_idx) || - nla_put_flag(msg, alg == WPA_ALG_IGTK ? + nla_put_flag(msg, (alg == WPA_ALG_IGTK || + alg == WPA_ALG_BIP_GMAC_128 || + alg == WPA_ALG_BIP_GMAC_256 || + alg == WPA_ALG_BIP_CMAC_256) ? NL80211_ATTR_KEY_DEFAULT_MGMT : NL80211_ATTR_KEY_DEFAULT)) goto fail;