summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-06-10 01:41:59 +0000
committersam <sam@FreeBSD.org>2005-06-10 01:41:59 +0000
commitafe76ba36a5f0bcdbe927ab6591d9e51e83ac3c1 (patch)
tree0ec7614520d73624e3fa41d1c2d6dfa5b5eff8a8 /sys
parent87f793a9fe74aa83ba926c43120584e2f111ca69 (diff)
downloadFreeBSD-src-afe76ba36a5f0bcdbe927ab6591d9e51e83ac3c1.zip
FreeBSD-src-afe76ba36a5f0bcdbe927ab6591d9e51e83ac3c1.tar.gz
reject open auth requests when shared key auth is configured
Obtained from: Atheros
Diffstat (limited to 'sys')
-rw-r--r--sys/net80211/ieee80211_input.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 9469500..54a677d 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -850,6 +850,19 @@ ieee80211_auth_open(struct ieee80211com *ic, struct ieee80211_frame *wh,
u_int16_t status)
{
+ if (ni->ni_authmode == IEEE80211_AUTH_SHARED) {
+ IEEE80211_DISCARD_MAC(ic, IEEE80211_MSG_AUTH,
+ ni->ni_macaddr, "open auth",
+ "bad sta auth mode %u", ni->ni_authmode);
+ ic->ic_stats.is_rx_bad_auth++; /* XXX */
+ if (ic->ic_opmode == IEEE80211_M_HOSTAP) {
+ /* XXX hack to workaround calling convention */
+ ieee80211_send_error(ic, ni, wh->i_addr2,
+ IEEE80211_FC0_SUBTYPE_AUTH,
+ (seq + 1) | (IEEE80211_STATUS_ALG<<16));
+ }
+ return;
+ }
switch (ic->ic_opmode) {
case IEEE80211_M_IBSS:
if (ic->ic_state != IEEE80211_S_RUN ||
OpenPOWER on IntegriCloud