diff options
author | sam <sam@FreeBSD.org> | 2007-02-04 05:49:16 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2007-02-04 05:49:16 +0000 |
commit | 9f1eaf60b8cd42b2761ccbfce8923bcf966762e6 (patch) | |
tree | e7aa4ae9a01d16f177c12a8daee61e0f45c20e93 /sys/net80211 | |
parent | b1367bfe2c1e060d7d0e30a02898e30ee01f8fff (diff) | |
download | FreeBSD-src-9f1eaf60b8cd42b2761ccbfce8923bcf966762e6.zip FreeBSD-src-9f1eaf60b8cd42b2761ccbfce8923bcf966762e6.tar.gz |
clear/reclaim challenge text when switching auth mode and operating as an ap
Obtained from: Atheros
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 53736c1..9c3d609 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -873,6 +873,15 @@ ieee80211_auth_open(struct ieee80211com *ic, struct ieee80211_frame *wh, "bad sta auth mode %u", ni->ni_authmode); ic->ic_stats.is_rx_bad_auth++; /* XXX */ if (ic->ic_opmode == IEEE80211_M_HOSTAP) { + /* + * Clear any challenge text that may be there if + * a previous shared key auth failed and then an + * open auth is attempted. + */ + if (ni->ni_challenge != NULL) { + FREE(ni->ni_challenge, M_DEVBUF); + ni->ni_challenge = NULL; + } /* XXX hack to workaround calling convention */ ieee80211_send_error(ic, ni, wh->i_addr2, IEEE80211_FC0_SUBTYPE_AUTH, |