diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-09-28 09:39:47 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-09-28 09:39:47 +0000 |
commit | f259e7398565e1b452af94c8f27d5493e1b611e8 (patch) | |
tree | e2a6e2819c1de6877a58842dcb1615997414fcf9 /package/network | |
parent | 77540a9ba07ee9e91439af04498b77a3336e8acd (diff) | |
download | upstream-f259e7398565e1b452af94c8f27d5493e1b611e8.tar.gz upstream-f259e7398565e1b452af94c8f27d5493e1b611e8.tar.bz2 upstream-f259e7398565e1b452af94c8f27d5493e1b611e8.zip |
hostapd: check for banned client on association event
When using FullMAC drivers (e.g. brcmfmac) we don't get mgmt frames so
check for banned client in probe request handler won't ever be used.
Since cfg80211 provides us info about STA associating let's put a check
there.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Backport of r47064
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@47065 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network')
-rw-r--r-- | package/network/services/hostapd/patches/600-ubus_support.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index 1efe84ed70..df2eac873c 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -830,3 +830,29 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd); int ieee802_11_set_beacons(struct hostapd_iface *iface); int ieee802_11_update_beacons(struct hostapd_iface *iface); +--- a/src/ap/drv_callbacks.c ++++ b/src/ap/drv_callbacks.c +@@ -49,6 +49,10 @@ int hostapd_notif_assoc(struct hostapd_d + u16 reason = WLAN_REASON_UNSPECIFIED; + u16 status = WLAN_STATUS_SUCCESS; + const u8 *p2p_dev_addr = NULL; ++ struct hostapd_ubus_request req = { ++ .type = HOSTAPD_UBUS_ASSOC_REQ, ++ .addr = addr, ++ }; + + if (addr == NULL) { + /* +@@ -113,6 +117,12 @@ int hostapd_notif_assoc(struct hostapd_d + } + sta->flags &= ~(WLAN_STA_WPS | WLAN_STA_MAYBE_WPS | WLAN_STA_WPS2); + ++ if (hostapd_ubus_handle_event(hapd, &req)) { ++ wpa_printf(MSG_DEBUG, "Station " MACSTR " assoc rejected by ubus handler.\n", ++ MAC2STR(req.addr)); ++ goto fail; ++ } ++ + #ifdef CONFIG_P2P + if (elems.p2p) { + wpabuf_free(sta->p2p_ie); |