[PATCH 3/3] nl80211,wpa_supplicant: Drop outdated tdls hack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wpa_tdls_set_key() did set the key_id to -1 to avoid an useless
NL80211_CMD_SET_KEY call the updated nl80211 driver no longer carries
out anyhow.
Remove the no longer required workaround.

Signed-off-by: Alexander Wetzel <alexander@xxxxxxxxxxxxxx>
---

This is also only a optional patch. It was in the now deprecated and
broken up v9 Extended Key ID series and since it depends on the nl80211
migration to key_flag tagged on here.

 src/drivers/driver_nl80211.c | 6 +-----
 src/rsn_supp/tdls.c          | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 5611df853..53090aa42 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3073,11 +3073,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 (key_flag & KEY_FLAG_PAIRWISE &&
 	    key_flag & (KEY_FLAG_GROUP | KEY_FLAG_DEFAULT))
 		return -EINVAL;
diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c
index bb8973942..7b47e3ac5 100644
--- a/src/rsn_supp/tdls.c
+++ b/src/rsn_supp/tdls.c
@@ -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 "
-- 
2.25.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux