]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add station tracking based on other management frame subtypes
authorJouni Malinen <j@w1.fi>
Sat, 5 Sep 2015 16:38:06 +0000 (19:38 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 5 Sep 2015 16:38:06 +0000 (19:38 +0300)
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>
src/ap/beacon.c
src/ap/beacon.h
src/ap/ieee802_11.c

index 85c6ef3cf4467210e9bc8be107ae133e943e67f8..5fe8fd5660b418f8050550d840b35c2141b04d73 100644 (file)
@@ -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;
 
index e183cde257982b496cc5dd7a6bdce33d0294a0ca..d98f42e8157aef2a01f53d16f4ab7d525e217b7c 100644 (file)
@@ -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,
index 78355d660314e425dc596f4276a0d2d1bb89606f..19c6a12e0c36bc79967be6c4f720165b2b223d48 100644 (file)
@@ -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");