diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-19 01:07:36 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2017-01-19 01:07:36 +0000 |
commit | f9ca574418d90dafa39b7a36f357e41bfedcdf14 (patch) | |
tree | da3f6bc9c2bc30dbc6a3ca7be4b349745184ce25 /sys/net80211/ieee80211_ioctl.c | |
parent | 3c7dd0c63b29394e0857d839ebb61ed0dc6c7e57 (diff) |
Enable TKIP as pairwise cipher when ifconfig's wpaprotos option enables WPA1.
Without this fix it was impossible to use WPA1 without also making use of the
wpaciphers option to enable TKIP. Problem noticed by pirofti@.
ok mpi@
Diffstat (limited to 'sys/net80211/ieee80211_ioctl.c')
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 5619bdcfe4c..971d21f620d 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.c,v 1.47 2016/12/31 17:51:44 phessler Exp $ */ +/* $OpenBSD: ieee80211_ioctl.c,v 1.48 2017/01/19 01:07:35 stsp Exp $ */ /* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */ /*- @@ -305,8 +305,11 @@ ieee80211_ioctl_setwpaparms(struct ieee80211com *ic, ic->ic_rsnciphers |= IEEE80211_CIPHER_CCMP; if (wpa->i_ciphers & IEEE80211_WPA_CIPHER_USEGROUP) ic->ic_rsnciphers = IEEE80211_CIPHER_USEGROUP; - if (ic->ic_rsnciphers == 0) /* set to default (CCMP) */ + if (ic->ic_rsnciphers == 0) { /* set to default (CCMP, TKIP if WPA1) */ ic->ic_rsnciphers = IEEE80211_CIPHER_CCMP; + if (ic->ic_rsnprotos & IEEE80211_PROTO_WPA) + ic->ic_rsnciphers |= IEEE80211_CIPHER_TKIP; + } ic->ic_flags |= IEEE80211_F_RSNON; |