From 4fd1a57d9230e2c2dff91f5719362dfb88d6020c Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Fri, 10 Jun 2005 01:43:28 +0000 Subject: [PATCH] discard open auth requests in adhoc mode --- sys/net80211/ieee80211_input.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 54a677d364e7..265642db4eda 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -865,17 +865,12 @@ ieee80211_auth_open(struct ieee80211com *ic, struct ieee80211_frame *wh, } switch (ic->ic_opmode) { case IEEE80211_M_IBSS: - if (ic->ic_state != IEEE80211_S_RUN || - seq != IEEE80211_AUTH_OPEN_REQUEST) { - ic->ic_stats.is_rx_bad_auth++; - return; - } - ieee80211_new_state(ic, IEEE80211_S_AUTH, - wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK); - break; - case IEEE80211_M_AHDEMO: + case IEEE80211_M_MONITOR: /* should not come here */ + IEEE80211_DISCARD_MAC(ic, IEEE80211_MSG_AUTH, + ni->ni_macaddr, "open auth", + "bad operating mode %u", ic->ic_opmode); break; case IEEE80211_M_HOSTAP: @@ -918,8 +913,6 @@ ieee80211_auth_open(struct ieee80211com *ic, struct ieee80211_frame *wh, ieee80211_new_state(ic, IEEE80211_S_ASSOC, wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK); break; - case IEEE80211_M_MONITOR: - break; } }