diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-07-13 08:26:27 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-07-13 08:26:27 +0000 |
commit | ab143df9dd8431a8a48784b2a2c9f40aa258acba (patch) | |
tree | 8be18bfea27f40ee46e596b4ecec05aaad823d58 /sys/net80211 | |
parent | 120baf40162b2c6ab53e5a65e253f08e788ed49d (diff) |
When a wifi interface acts as a client and the WPA handshake is done,
update the WPA group cipher value in interface configuration data.
Code relying in this value will otherwise get the group cipher wrong.
One obvious example is ifconfig which now displays the negotiated group
cipher rather than always displaying the default value 'ccmp'.
Fixes a regression where athn(4) no longer worked against WPA2 APs which
use TKIP as a group cipher for compatibility with WPA1.
Problem reported by Tim Chase.
ok kettenis@
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_pae_input.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_pae_input.c b/sys/net80211/ieee80211_pae_input.c index 333f6c1b22a..d8982de8563 100644 --- a/sys/net80211/ieee80211_pae_input.c +++ b/sys/net80211/ieee80211_pae_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_pae_input.c,v 1.34 2020/05/31 09:11:12 stsp Exp $ */ +/* $OpenBSD: ieee80211_pae_input.c,v 1.35 2020/07/13 08:26:26 stsp Exp $ */ /*- * Copyright (c) 2007,2008 Damien Bergamini <damien.bergamini@free.fr> @@ -651,6 +651,8 @@ ieee80211_recv_4way_msg3(struct ieee80211com *ic, ni->ni_port_valid = 1; ieee80211_set_link_state(ic, LINK_STATE_UP); ni->ni_assoc_fail = 0; + if (ic->ic_opmode == IEEE80211_M_STA) + ic->ic_rsngroupcipher = ni->ni_rsngroupcipher; } } deauth: |