Rename WPA_ALG_IGTK to use the correct cipher name for BIP

IGTK is the key that is used a BIP cipher. WPA_ALG_IGTK was the
historical name used for this enum value when only the AES-128-CMAC
based BIP algorithm was supported. Rename this to match the style used
with the other BIP options.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2020-05-17 00:11:59 +03:00
parent bd1aebbd08
commit d3cab56c04
7 changed files with 11 additions and 10 deletions

View file

@ -453,7 +453,7 @@ static int hostapd_wpa_auth_set_key(void *ctx, int vlan_id, enum wpa_alg alg,
os_memcpy(sta->last_tk, key, key_len);
sta->last_tk_len = key_len;
}
} else if (alg == WPA_ALG_IGTK ||
} else if (alg == WPA_ALG_BIP_CMAC_128 ||
alg == WPA_ALG_BIP_GMAC_128 ||
alg == WPA_ALG_BIP_GMAC_256 ||
alg == WPA_ALG_BIP_CMAC_256) {

View file

@ -190,7 +190,7 @@ enum wpa_alg {
WPA_ALG_WEP,
WPA_ALG_TKIP,
WPA_ALG_CCMP,
WPA_ALG_IGTK,
WPA_ALG_BIP_CMAC_128,
WPA_ALG_GCMP,
WPA_ALG_SMS4,
WPA_ALG_KRK,

View file

@ -2305,7 +2305,7 @@ enum wpa_alg wpa_cipher_to_alg(int cipher)
case WPA_CIPHER_TKIP:
return WPA_ALG_TKIP;
case WPA_CIPHER_AES_128_CMAC:
return WPA_ALG_IGTK;
return WPA_ALG_BIP_CMAC_128;
case WPA_CIPHER_BIP_GMAC_128:
return WPA_ALG_BIP_GMAC_128;
case WPA_CIPHER_BIP_GMAC_256:

View file

@ -1553,8 +1553,9 @@ struct wpa_driver_set_key_params {
* alg - Encryption algorithm
*
* (%WPA_ALG_NONE, %WPA_ALG_WEP, %WPA_ALG_TKIP, %WPA_ALG_CCMP,
* %WPA_ALG_IGTK, %WPA_ALG_GCMP, %WPA_ALG_GCMP_256, %WPA_ALG_CCMP_256,
* %WPA_ALG_BIP_GMAC_128, %WPA_ALG_BIP_GMAC_256, %WPA_ALG_BIP_CMAC_256);
* %WPA_ALG_BIP_AES_CMAC_128, %WPA_ALG_GCMP, %WPA_ALG_GCMP_256,
* %WPA_ALG_CCMP_256, %WPA_ALG_BIP_GMAC_128, %WPA_ALG_BIP_GMAC_256,
* %WPA_ALG_BIP_CMAC_256);
* %WPA_ALG_NONE clears the key. */
enum wpa_alg alg;

View file

@ -532,7 +532,7 @@ atheros_set_key(void *priv, struct wpa_driver_set_key_params *params)
cipher = IEEE80211_CIPHER_AES_GCM_256;
break;
#endif /* ATH_GCM_SUPPORT */
case WPA_ALG_IGTK:
case WPA_ALG_BIP_CMAC_128:
cipher = IEEE80211_CIPHER_AES_CMAC;
break;
#ifdef ATH_GCM_SUPPORT

View file

@ -2927,7 +2927,7 @@ static u32 wpa_alg_to_cipher_suite(enum wpa_alg alg, size_t key_len)
return RSN_CIPHER_SUITE_CCMP_256;
case WPA_ALG_GCMP_256:
return RSN_CIPHER_SUITE_GCMP_256;
case WPA_ALG_IGTK:
case WPA_ALG_BIP_CMAC_128:
return RSN_CIPHER_SUITE_AES_128_CMAC;
case WPA_ALG_BIP_GMAC_128:
return RSN_CIPHER_SUITE_BIP_GMAC_128;
@ -3284,7 +3284,7 @@ static int wpa_driver_nl80211_set_key(struct i802_bss *bss,
goto fail2;
if (!key_msg ||
nla_put_u8(key_msg, NL80211_KEY_IDX, key_idx) ||
nla_put_flag(key_msg, (alg == WPA_ALG_IGTK ||
nla_put_flag(key_msg, (alg == WPA_ALG_BIP_CMAC_128 ||
alg == WPA_ALG_BIP_GMAC_128 ||
alg == WPA_ALG_BIP_GMAC_256 ||
alg == WPA_ALG_BIP_CMAC_256) ?
@ -3356,7 +3356,7 @@ static int nl_add_key(struct nl_msg *msg, enum wpa_alg alg,
if (!suite)
return -1;
if (defkey && alg == WPA_ALG_IGTK) {
if (defkey && alg == WPA_ALG_BIP_CMAC_128) {
if (nla_put_flag(msg, NL80211_KEY_DEFAULT_MGMT))
return -1;
} else if (defkey) {

View file

@ -1773,7 +1773,7 @@ static int wpa_driver_wext_set_key_ext(void *priv, enum wpa_alg alg,
case WPA_ALG_CCMP:
ext->alg = IW_ENCODE_ALG_CCMP;
break;
case WPA_ALG_IGTK:
case WPA_ALG_BIP_CMAC_128:
ext->alg = IW_ENCODE_ALG_AES_CMAC;
break;
default: