]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix default group key management index configuration
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 23 Jan 2015 14:47:53 +0000 (16:47 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 24 Jan 2015 17:37:42 +0000 (19:37 +0200)
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 <jouni@qca.qualcomm.com>
src/drivers/driver_nl80211.c

index 709536a3f61af5c2d3e8fdcfd28b47722a757a72..f955ee4f0906b49078575655c2f4a344fda3b03e 100644 (file)
@@ -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;