diff options
author | sam <sam@FreeBSD.org> | 2006-02-21 23:55:38 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2006-02-21 23:55:38 +0000 |
commit | 129e00e81f0f83db1352b5c5c34698ca5af7c7bb (patch) | |
tree | f98b3a2bd52da9fa832200a49648c92c96be8153 /usr.sbin/wpa | |
parent | 43320429a8b6b89bdac0ad52a071bb23c1d2e458 (diff) | |
download | FreeBSD-src-129e00e81f0f83db1352b5c5c34698ca5af7c7bb.zip FreeBSD-src-129e00e81f0f83db1352b5c5c34698ca5af7c7bb.tar.gz |
use the specified key index for non-group keys; this fixes static
wep key configure at key indices > 0 and 802.1x/EAPOL operation
with ap's that want the station to install a key at indices > 0.
Hard work by: Joe Love
Reviewed by: avatar
MFC after: 1 week
Diffstat (limited to 'usr.sbin/wpa')
-rw-r--r-- | usr.sbin/wpa/wpa_supplicant/driver_freebsd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c b/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c index e69dcd5..6a02df6 100644 --- a/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c +++ b/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c @@ -311,10 +311,11 @@ wpa_driver_bsd_set_key(void *priv, wpa_alg alg, if (bcmp(addr, "\xff\xff\xff\xff\xff\xff", IEEE80211_ADDR_LEN) == 0) { wk.ik_flags |= IEEE80211_KEY_GROUP; wk.ik_keyix = key_idx; - if (set_tx) - wk.ik_flags |= IEEE80211_KEY_DEFAULT; - } else - wk.ik_keyix = IEEE80211_KEYIX_NONE; + } else { + wk.ik_keyix = (key_idx == 0 ? IEEE80211_KEYIX_NONE : key_idx); + } + if (wk.ik_keyix != IEEE80211_KEYIX_NONE && set_tx) + wk.ik_flags |= IEEE80211_KEY_DEFAULT; wk.ik_keylen = key_len; memcpy(&wk.ik_keyrsc, seq, seq_len); memcpy(wk.ik_keydata, key, key_len); |