diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2019-03-15 11:05:30 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2019-03-15 11:05:30 +0000 |
commit | d61fbe8d17d716fe20a52e4167696f62cb93e86d (patch) | |
tree | 07ec6355bf83738d931eafcc450d945942c6b26d /sys/net80211 | |
parent | 874591a8b815fdf63f31e257131fb68f1e43a985 (diff) |
fix autojoin for WEP network by actually saving the WEP auth key
discovered while attempting to autojoin WEP networks
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index a7dfefce36c..0e5279a2453 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.162 2019/03/01 08:13:11 stsp Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.163 2019/03/15 11:05:29 phessler Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -215,7 +215,7 @@ ieee80211_ess_setnwkeys(struct ieee80211_ess *ess, const struct ieee80211_nwkey *nwkey) { struct ieee80211_key *k; - int i; + int error, i; if (nwkey->i_wepon == IEEE80211_NWKEY_OPEN) { if (!(ess->flags & IEEE80211_F_WEPON)) @@ -242,6 +242,9 @@ ieee80211_ess_setnwkeys(struct ieee80211_ess *ess, k->k_cipher = IEEE80211_CIPHER_WEP104; k->k_len = ieee80211_cipher_keylen(k->k_cipher); k->k_flags = IEEE80211_KEY_GROUP | IEEE80211_KEY_TX; + error = copyin(nwkey->i_key[i].i_keydat, k->k_key, k->k_len); + if (error != 0) + return error; } ess->def_txkey = nwkey->i_defkid - 1; ess->flags |= IEEE80211_F_WEPON; |