]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Drop outdated TDLS set_key() hack
authorAlexander Wetzel <alexander@wetzel-home.de>
Thu, 5 Mar 2020 21:06:45 +0000 (22:06 +0100)
committerJouni Malinen <j@w1.fi>
Fri, 6 Mar 2020 19:44:31 +0000 (21:44 +0200)
wpa_tdls_set_key() did set the key_id to -1 to avoid a useless
NL80211_CMD_SET_KEY call that the updated nl80211 driver no longer
carries out. Remove the no longer required workaround.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
src/drivers/driver_nl80211.c
src/rsn_supp/tdls.c

index e56ae9fca1142e9687245ac35e33b8de647df5c0..f44209db03c220e47fee2ed642b506b91c2e7c48 100644 (file)
@@ -3077,10 +3077,7 @@ static int wpa_driver_nl80211_set_key(struct i802_bss *bss,
                   "set_tx=%d seq_len=%lu key_len=%lu key_flag=0x%x",
                   __func__, ifindex, ifname, alg, addr, key_idx, set_tx,
                   (unsigned long) seq_len, (unsigned long) key_len, key_flag);
-#ifdef CONFIG_TDLS
-       if (key_idx == -1)
-               key_idx = 0;
-#endif /* CONFIG_TDLS */
+
        if (check_key_flag(key_flag)) {
                wpa_printf(MSG_DEBUG, "%s: invalid key_flag", __func__);
                return -EINVAL;
index bb8973942eb96bf132929196fe69f592d18aca42..7b47e3ac52f137a14a2e81f6af7391840f4221a4 100644 (file)
@@ -227,7 +227,7 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
 
        wpa_printf(MSG_DEBUG, "TDLS: Configure pairwise key for peer " MACSTR,
                   MAC2STR(peer->addr));
-       if (wpa_sm_set_key(sm, alg, peer->addr, -1, 1, rsc, sizeof(rsc),
+       if (wpa_sm_set_key(sm, alg, peer->addr, 0, 1, rsc, sizeof(rsc),
                           peer->tpk.tk, key_len,
                           KEY_FLAG_PAIRWISE_RX_TX) < 0) {
                wpa_printf(MSG_WARNING, "TDLS: Failed to set TPK to the "