aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-09-05 16:38:06 (GMT)
committerJouni Malinen <j@w1.fi>2015-09-05 16:38:06 (GMT)
commitb308a304d4289a0d9cf4f003ae8fa7aeba8c6b45 (patch)
treecd074e7c8bf537d1bb4e5e3a9ca1425cbaf6a660 /src
parentc4f0c4d67dc6ee2fbd9623e189756c4e6b0e7d78 (diff)
downloadhostap-b308a304d4289a0d9cf4f003ae8fa7aeba8c6b45.zip
hostap-b308a304d4289a0d9cf4f003ae8fa7aeba8c6b45.tar.gz
hostap-b308a304d4289a0d9cf4f003ae8fa7aeba8c6b45.tar.bz2
Add station tracking based on other management frame subtypes
This extends the previous tracking design to add a station entry based on other management frames than Probe Request frames. For example, this covers a case where the station is using passive scanning. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r--src/ap/beacon.c2
-rw-r--r--src/ap/beacon.h1
-rw-r--r--src/ap/ieee802_11.c3
3 files changed, 5 insertions, 1 deletions
diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 85c6ef3..5fe8fd5 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -592,7 +592,7 @@ static struct hostapd_sta_info * sta_track_get(struct hostapd_iface *iface,
}
-static void sta_track_add(struct hostapd_iface *iface, const u8 *addr)
+void sta_track_add(struct hostapd_iface *iface, const u8 *addr)
{
struct hostapd_sta_info *info;
diff --git a/src/ap/beacon.h b/src/ap/beacon.h
index e183cde..d98f42e 100644
--- a/src/ap/beacon.h
+++ b/src/ap/beacon.h
@@ -21,6 +21,7 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface);
int ieee802_11_build_ap_params(struct hostapd_data *hapd,
struct wpa_driver_ap_params *params);
void ieee802_11_free_ap_params(struct wpa_driver_ap_params *params);
+void sta_track_add(struct hostapd_iface *iface, const u8 *addr);
void sta_track_expire(struct hostapd_iface *iface, int force);
struct hostapd_data *
sta_track_seen_on(struct hostapd_iface *iface, const u8 *addr,
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 78355d6..19c6a12 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -2335,6 +2335,9 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
return 0;
}
+ if (hapd->iconf->track_sta_max_num)
+ sta_track_add(hapd->iface, mgmt->sa);
+
switch (stype) {
case WLAN_FC_STYPE_AUTH:
wpa_printf(MSG_DEBUG, "mgmt::auth");