diff options
Diffstat (limited to 'package/network/services/hostapd/patches/600-ubus_support.patch')
-rw-r--r-- | package/network/services/hostapd/patches/600-ubus_support.patch | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index d5767259b6..5936ef47fd 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -1,6 +1,6 @@ --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -155,6 +155,11 @@ OBJS += ../src/common/hw_features_common +@@ -157,6 +157,11 @@ OBJS += ../src/common/hw_features_common OBJS += ../src/eapol_auth/eapol_auth_sm.o @@ -22,7 +22,7 @@ struct wpa_ctrl_dst; struct radius_server_data; -@@ -107,6 +108,7 @@ struct hostapd_data { +@@ -117,6 +118,7 @@ struct hostapd_data { struct hostapd_iface *iface; struct hostapd_config *iconf; struct hostapd_bss_config *conf; @@ -30,7 +30,7 @@ int interface_added; /* virtual interface added for this BSS */ unsigned int started:1; unsigned int disabled:1; -@@ -299,6 +301,8 @@ struct hostapd_iface { +@@ -322,6 +324,8 @@ struct hostapd_iface { struct hostapd_config *conf; char phy[16]; /* Name of the PHY (radio) */ @@ -661,7 +661,7 @@ +#endif --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c -@@ -280,6 +280,7 @@ static void hostapd_free_hapd_data(struc +@@ -282,6 +282,7 @@ static void hostapd_free_hapd_data(struc hapd->started = 0; wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface); @@ -669,7 +669,7 @@ iapp_deinit(hapd->iapp); hapd->iapp = NULL; accounting_deinit(hapd); -@@ -1118,6 +1119,8 @@ static int hostapd_setup_bss(struct host +@@ -1137,6 +1138,8 @@ static int hostapd_setup_bss(struct host if (hapd->driver && hapd->driver->set_operstate) hapd->driver->set_operstate(hapd->drv_priv, 1); @@ -678,7 +678,7 @@ return 0; } -@@ -1523,6 +1526,7 @@ static int hostapd_setup_interface_compl +@@ -1662,6 +1665,7 @@ static int hostapd_setup_interface_compl if (err) goto fail; @@ -686,7 +686,7 @@ wpa_printf(MSG_DEBUG, "Completing interface initialization"); if (iface->conf->channel) { #ifdef NEED_AP_MLME -@@ -1700,6 +1704,7 @@ dfs_offload: +@@ -1842,6 +1846,7 @@ dfs_offload: fail: wpa_printf(MSG_ERROR, "Interface initialization failed"); @@ -694,7 +694,7 @@ hostapd_set_state(iface, HAPD_IFACE_DISABLED); wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED); #ifdef CONFIG_FST -@@ -2125,6 +2130,7 @@ void hostapd_interface_deinit_free(struc +@@ -2268,6 +2273,7 @@ void hostapd_interface_deinit_free(struc (unsigned int) iface->conf->num_bss); driver = iface->bss[0]->driver; drv_priv = iface->bss[0]->drv_priv; @@ -704,7 +704,7 @@ __func__, driver, drv_priv); --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c -@@ -877,7 +877,8 @@ int auth_sae_init_committed(struct hosta +@@ -929,7 +929,8 @@ int auth_sae_init_committed(struct hosta static void handle_auth(struct hostapd_data *hapd, @@ -714,7 +714,7 @@ { u16 auth_alg, auth_transaction, status_code; u16 resp = WLAN_STATUS_SUCCESS; -@@ -893,6 +894,11 @@ static void handle_auth(struct hostapd_d +@@ -945,6 +946,11 @@ static void handle_auth(struct hostapd_d char *identity = NULL; char *radius_cui = NULL; u16 seq_ctrl; @@ -724,9 +724,9 @@ + .frame_info = fi, + }; - if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) { - wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)", -@@ -1044,6 +1050,14 @@ static void handle_auth(struct hostapd_d + os_memset(&vlan_id, 0, sizeof(vlan_id)); + +@@ -1098,6 +1104,14 @@ static void handle_auth(struct hostapd_d resp = WLAN_STATUS_UNSPECIFIED_FAILURE; goto fail; } @@ -741,7 +741,7 @@ if (res == HOSTAPD_ACL_PENDING) { wpa_printf(MSG_DEBUG, "Authentication frame from " MACSTR " waiting for an external authentication", -@@ -1776,13 +1790,18 @@ static void send_assoc_resp(struct hosta +@@ -1982,13 +1996,18 @@ static u16 send_assoc_resp(struct hostap static void handle_assoc(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, @@ -749,7 +749,7 @@ + int reassoc, struct hostapd_frame_info *fi) { u16 capab_info, listen_interval, seq_ctrl, fc; - u16 resp = WLAN_STATUS_SUCCESS; + u16 resp = WLAN_STATUS_SUCCESS, reply_res; const u8 *pos; int left, i; struct sta_info *sta; @@ -761,9 +761,9 @@ if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) : sizeof(mgmt->u.assoc_req))) { -@@ -1902,6 +1921,13 @@ static void handle_assoc(struct hostapd_ - goto fail; +@@ -2108,6 +2127,13 @@ static void handle_assoc(struct hostapd_ } + #endif /* CONFIG_MBO */ + if (hostapd_ubus_handle_event(hapd, &req)) { + wpa_printf(MSG_DEBUG, "Station " MACSTR " assoc rejected by ubus handler.\n", @@ -772,10 +772,10 @@ + goto fail; + } + - sta->capability = capab_info; - sta->listen_interval = listen_interval; - -@@ -2328,7 +2354,7 @@ int ieee802_11_mgmt(struct hostapd_data + /* + * sta->capability is used in check_assoc_ies() for RRM enabled + * capability element. +@@ -2588,7 +2614,7 @@ int ieee802_11_mgmt(struct hostapd_data if (stype == WLAN_FC_STYPE_PROBE_REQ) { @@ -784,7 +784,7 @@ return 1; } -@@ -2346,17 +2372,17 @@ int ieee802_11_mgmt(struct hostapd_data +@@ -2606,17 +2632,17 @@ int ieee802_11_mgmt(struct hostapd_data switch (stype) { case WLAN_FC_STYPE_AUTH: wpa_printf(MSG_DEBUG, "mgmt::auth"); @@ -807,7 +807,7 @@ case WLAN_FC_STYPE_DISASSOC: --- a/src/ap/beacon.c +++ b/src/ap/beacon.c -@@ -667,7 +667,7 @@ sta_track_seen_on(struct hostapd_iface * +@@ -675,7 +675,7 @@ sta_track_seen_on(struct hostapd_iface * void handle_probe_req(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, @@ -816,7 +816,7 @@ { u8 *resp; struct ieee802_11_elems elems; -@@ -676,9 +676,15 @@ void handle_probe_req(struct hostapd_dat +@@ -684,9 +684,15 @@ void handle_probe_req(struct hostapd_dat size_t i, resp_len; int noack; enum ssid_match_result res; @@ -830,9 +830,9 @@ + .frame_info = fi, + }; - ie = mgmt->u.probe_req.variable; - if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.probe_req)) -@@ -830,6 +836,12 @@ void handle_probe_req(struct hostapd_dat + if (len < IEEE80211_HDRLEN) + return; +@@ -838,6 +844,12 @@ void handle_probe_req(struct hostapd_dat } #endif /* CONFIG_P2P */ @@ -858,7 +858,7 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface); --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c -@@ -51,6 +51,10 @@ int hostapd_notif_assoc(struct hostapd_d +@@ -52,6 +52,10 @@ int hostapd_notif_assoc(struct hostapd_d u16 reason = WLAN_REASON_UNSPECIFIED; u16 status = WLAN_STATUS_SUCCESS; const u8 *p2p_dev_addr = NULL; @@ -869,7 +869,7 @@ if (addr == NULL) { /* -@@ -123,6 +127,12 @@ int hostapd_notif_assoc(struct hostapd_d +@@ -124,6 +128,12 @@ int hostapd_notif_assoc(struct hostapd_d goto fail; } |