aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-05-08 09:51:28 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 08:59:39 (GMT)
commit829ca99ebad9dd511ecbca995b13a94a064ed243 (patch)
treed60dcc181f352600ebaa50e983b5513268ed21f7
parent6de339d9e9d2de55569669dc160129137fccc7c4 (diff)
downloadhostap-06-829ca99ebad9dd511ecbca995b13a94a064ed243.zip
hostap-06-829ca99ebad9dd511ecbca995b13a94a064ed243.tar.gz
hostap-06-829ca99ebad9dd511ecbca995b13a94a064ed243.tar.bz2
Drop unprotected Robust Action frames from MFP STAs
These frames are delivered through mac80211 monitor interface, so we need to filter them out in hostapd. (cherry picked from commit c4e281fd91080200424cec2162f072737b80e7e8)
-rw-r--r--hostapd/ieee802_11.c25
-rw-r--r--src/common/ieee802_11_defs.h2
2 files changed, 24 insertions, 3 deletions
diff --git a/hostapd/ieee802_11.c b/hostapd/ieee802_11.c
index d5ac755..6d4d253 100644
--- a/hostapd/ieee802_11.c
+++ b/hostapd/ieee802_11.c
@@ -1344,9 +1344,18 @@ static void hostapd_sa_query_action(struct hostapd_data *hapd,
#endif /* CONFIG_IEEE80211W */
+static int robust_action_frame(u8 category)
+{
+ return category != WLAN_ACTION_PUBLIC &&
+ category != WLAN_ACTION_HT;
+}
+
+
static void handle_action(struct hostapd_data *hapd,
struct ieee80211_mgmt *mgmt, size_t len)
{
+ struct sta_info *sta;
+
if (len < IEEE80211_HDRLEN + 1) {
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_DEBUG,
@@ -1355,13 +1364,23 @@ static void handle_action(struct hostapd_data *hapd,
return;
}
+ sta = ap_get_sta(hapd, mgmt->sa);
+#ifdef CONFIG_IEEE80211W
+ if (sta && (sta->flags & WLAN_STA_MFP) &&
+ !(mgmt->frame_control & host_to_le16(WLAN_FC_ISWEP) &&
+ robust_action_frame(mgmt->u.action.category))) {
+ hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
+ HOSTAPD_LEVEL_DEBUG,
+ "Dropped unprotected Robust Action frame from "
+ "an MFP STA");
+ return;
+ }
+#endif /* CONFIG_IEEE80211W */
+
switch (mgmt->u.action.category) {
#ifdef CONFIG_IEEE80211R
case WLAN_ACTION_FT:
{
- struct sta_info *sta;
-
- sta = ap_get_sta(hapd, mgmt->sa);
if (sta == NULL || !(sta->flags & WLAN_STA_ASSOC)) {
wpa_printf(MSG_DEBUG, "IEEE 802.11: Ignored FT Action "
"frame from unassociated STA " MACSTR,
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index e4d3ed8..1564026 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -210,8 +210,10 @@
#define WLAN_ACTION_QOS 1
#define WLAN_ACTION_DLS 2
#define WLAN_ACTION_BLOCK_ACK 3
+#define WLAN_ACTION_PUBLIC 4
#define WLAN_ACTION_RADIO_MEASUREMENT 5
#define WLAN_ACTION_FT 6
+#define WLAN_ACTION_HT 7
#define WLAN_ACTION_SA_QUERY 8
#define WLAN_ACTION_WMM 17