aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/patches/600-ubus_support.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2017-08-22 16:33:40 +0200
committerJohn Crispin <john@phrozen.org>2017-08-22 21:31:39 +0200
commitd18e0dc7d1f37e3bf779fb474ffc28b1fea690a4 (patch)
tree528617a83f5492b835a86383ab2e4162f2c309e6 /package/network/services/hostapd/patches/600-ubus_support.patch
parent69da83d9f12e4e48b546fc3fc3ff555034959211 (diff)
downloadupstream-d18e0dc7d1f37e3bf779fb474ffc28b1fea690a4.tar.gz
upstream-d18e0dc7d1f37e3bf779fb474ffc28b1fea690a4.tar.bz2
upstream-d18e0dc7d1f37e3bf779fb474ffc28b1fea690a4.zip
hostapd: add additional ubus notifications
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'package/network/services/hostapd/patches/600-ubus_support.patch')
-rw-r--r--package/network/services/hostapd/patches/600-ubus_support.patch49
1 files changed, 47 insertions, 2 deletions
diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch
index bfab382985..35c2c13092 100644
--- a/package/network/services/hostapd/patches/600-ubus_support.patch
+++ b/package/network/services/hostapd/patches/600-ubus_support.patch
@@ -156,7 +156,24 @@
/*
* sta->capability is used in check_assoc_ies() for RRM enabled
* capability element.
-@@ -3025,7 +3051,7 @@ int ieee802_11_mgmt(struct hostapd_data
+@@ -2688,6 +2714,7 @@ static void handle_disassoc(struct hosta
+ wpa_printf(MSG_DEBUG, "disassocation: STA=" MACSTR " reason_code=%d",
+ MAC2STR(mgmt->sa),
+ le_to_host16(mgmt->u.disassoc.reason_code));
++ hostapd_ubus_notify(hapd, "disassoc", mgmt->sa);
+
+ sta = ap_get_sta(hapd, mgmt->sa);
+ if (sta == NULL) {
+@@ -2742,6 +2769,8 @@ static void handle_deauth(struct hostapd
+ " reason_code=%d",
+ MAC2STR(mgmt->sa), le_to_host16(mgmt->u.deauth.reason_code));
+
++ hostapd_ubus_notify(hapd, "deauth", mgmt->sa);
++
+ sta = ap_get_sta(hapd, mgmt->sa);
+ if (sta == NULL) {
+ wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying "
+@@ -3025,7 +3054,7 @@ int ieee802_11_mgmt(struct hostapd_data
if (stype == WLAN_FC_STYPE_PROBE_REQ) {
@@ -165,7 +182,7 @@
return 1;
}
-@@ -3043,17 +3069,17 @@ int ieee802_11_mgmt(struct hostapd_data
+@@ -3043,17 +3072,17 @@ int ieee802_11_mgmt(struct hostapd_data
switch (stype) {
case WLAN_FC_STYPE_AUTH:
wpa_printf(MSG_DEBUG, "mgmt::auth");
@@ -263,3 +280,31 @@
#ifdef CONFIG_P2P
if (elems.p2p) {
wpabuf_free(sta->p2p_ie);
+--- a/src/ap/sta_info.c
++++ b/src/ap/sta_info.c
+@@ -386,6 +386,7 @@ void ap_handle_timer(void *eloop_ctx, vo
+ HOSTAPD_LEVEL_INFO, "deauthenticated due to "
+ "local deauth request");
+ ap_free_sta(hapd, sta);
++ hostapd_ubus_notify(hapd, "local-deauth", sta->addr);
+ return;
+ }
+
+@@ -533,6 +534,7 @@ skip_poll:
+ hapd, sta,
+ WLAN_REASON_PREV_AUTH_NOT_VALID);
+ ap_free_sta(hapd, sta);
++ hostapd_ubus_notify(hapd, "inactive-deauth", sta->addr);
+ break;
+ }
+ }
+--- a/src/ap/wpa_auth_glue.c
++++ b/src/ap/wpa_auth_glue.c
+@@ -159,6 +159,7 @@ static void hostapd_wpa_auth_psk_failure
+ struct hostapd_data *hapd = ctx;
+ wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR,
+ MAC2STR(addr));
++ hostapd_ubus_notify(hapd, "key-mismatch", addr);
+ }
+
+