hostapd: update to 2023-06-22

Removed, merged upstream:
- 170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch

Manually refreshed:
- 040-mesh-allow-processing-authentication-frames-in-block.patch
- 600-ubus_support.patch
- 761-shared_das_port.patch

Fixes: #12661
Fixes: 304423a4 ("hostapd: update to 2023-03-29")
Signed-off-by: Andre Heider <a.heider@gmail.com>
(cherry picked from commit cd804c1ebb)
This commit is contained in:
Andre Heider 2023-07-06 08:16:50 +02:00 committed by Nick Hainke
parent 57e7188e63
commit 8d7d9aa4a4
32 changed files with 162 additions and 202 deletions

View File

@ -9,9 +9,9 @@ PKG_RELEASE:=1.2
PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_URL:=http://w1.fi/hostap.git
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2023-03-29 PKG_SOURCE_DATE:=2023-06-22
PKG_SOURCE_VERSION:=bb945b98fefc64887dffb40773a19d77585cee42 PKG_SOURCE_VERSION:=599d00be9de2846c6ea18c1487d8329522ade22b
PKG_MIRROR_HASH:=1da8a39c7c81ce257994874402a86d00080a6145b5eb5c5fc44b2fae1853fe8d PKG_MIRROR_HASH:=828810c558ea181e45ed0c8b940f5c41e55775e2979a15aed8cf0ab17dd7723c
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=BSD-3-Clause PKG_LICENSE:=BSD-3-Clause

View File

@ -14,7 +14,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
--- a/wpa_supplicant/wpa_supplicant.c --- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c
@@ -2621,7 +2621,7 @@ static int drv_supports_vht(struct wpa_s @@ -2638,7 +2638,7 @@ static int drv_supports_vht(struct wpa_s
} }
@ -23,7 +23,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
{ {
int i; int i;
@@ -2630,7 +2630,10 @@ static bool ibss_mesh_is_80mhz_avail(int @@ -2647,7 +2647,10 @@ static bool ibss_mesh_is_80mhz_avail(int
chan = hw_get_channel_chan(mode, i, NULL); chan = hw_get_channel_chan(mode, i, NULL);
if (!chan || if (!chan ||
@ -35,7 +35,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
return false; return false;
} }
@@ -2757,7 +2760,7 @@ static void ibss_mesh_select_40mhz(struc @@ -2774,7 +2777,7 @@ static void ibss_mesh_select_40mhz(struc
const struct wpa_ssid *ssid, const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode, struct hostapd_hw_modes *mode,
struct hostapd_freq_params *freq, struct hostapd_freq_params *freq,
@ -44,7 +44,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
int chan_idx; int chan_idx;
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL; struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
int i, res; int i, res;
@@ -2781,8 +2784,11 @@ static void ibss_mesh_select_40mhz(struc @@ -2798,8 +2801,11 @@ static void ibss_mesh_select_40mhz(struc
return; return;
/* Check primary channel flags */ /* Check primary channel flags */
@ -57,7 +57,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
#ifdef CONFIG_HT_OVERRIDES #ifdef CONFIG_HT_OVERRIDES
if (ssid->disable_ht40) if (ssid->disable_ht40)
@@ -2808,8 +2814,11 @@ static void ibss_mesh_select_40mhz(struc @@ -2825,8 +2831,11 @@ static void ibss_mesh_select_40mhz(struc
return; return;
/* Check secondary channel flags */ /* Check secondary channel flags */
@ -70,7 +70,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
if (ht40 == -1) { if (ht40 == -1) {
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS)) if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
@@ -2863,7 +2872,7 @@ static bool ibss_mesh_select_80_160mhz(s @@ -2880,7 +2889,7 @@ static bool ibss_mesh_select_80_160mhz(s
const struct wpa_ssid *ssid, const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode, struct hostapd_hw_modes *mode,
struct hostapd_freq_params *freq, struct hostapd_freq_params *freq,
@ -79,7 +79,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
static const int bw80[] = { static const int bw80[] = {
5180, 5260, 5500, 5580, 5660, 5745, 5825, 5180, 5260, 5500, 5580, 5660, 5745, 5825,
5955, 6035, 6115, 6195, 6275, 6355, 6435, 5955, 6035, 6115, 6195, 6275, 6355, 6435,
@@ -2908,7 +2917,7 @@ static bool ibss_mesh_select_80_160mhz(s @@ -2925,7 +2934,7 @@ static bool ibss_mesh_select_80_160mhz(s
goto skip_80mhz; goto skip_80mhz;
/* Use 40 MHz if channel not usable */ /* Use 40 MHz if channel not usable */
@ -88,7 +88,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
goto skip_80mhz; goto skip_80mhz;
chwidth = CONF_OPER_CHWIDTH_80MHZ; chwidth = CONF_OPER_CHWIDTH_80MHZ;
@@ -2922,7 +2931,7 @@ static bool ibss_mesh_select_80_160mhz(s @@ -2939,7 +2948,7 @@ static bool ibss_mesh_select_80_160mhz(s
if ((mode->he_capab[ieee80211_mode].phy_cap[ if ((mode->he_capab[ieee80211_mode].phy_cap[
HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] & HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &
HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz && HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz &&
@ -97,7 +97,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
for (j = 0; j < ARRAY_SIZE(bw160); j++) { for (j = 0; j < ARRAY_SIZE(bw160); j++) {
if (freq->freq == bw160[j]) { if (freq->freq == bw160[j]) {
chwidth = CONF_OPER_CHWIDTH_160MHZ; chwidth = CONF_OPER_CHWIDTH_160MHZ;
@@ -2950,10 +2959,12 @@ static bool ibss_mesh_select_80_160mhz(s @@ -2967,10 +2976,12 @@ static bool ibss_mesh_select_80_160mhz(s
if (!chan) if (!chan)
continue; continue;
@ -113,7 +113,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
/* Found a suitable second segment for 80+80 */ /* Found a suitable second segment for 80+80 */
chwidth = CONF_OPER_CHWIDTH_80P80MHZ; chwidth = CONF_OPER_CHWIDTH_80P80MHZ;
@@ -3008,6 +3019,7 @@ void ibss_mesh_setup_freq(struct wpa_sup @@ -3025,6 +3036,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
int i, obss_scan = 1; int i, obss_scan = 1;
u8 channel; u8 channel;
bool is_6ghz; bool is_6ghz;
@ -121,7 +121,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
freq->freq = ssid->frequency; freq->freq = ssid->frequency;
@@ -3053,9 +3065,9 @@ void ibss_mesh_setup_freq(struct wpa_sup @@ -3070,9 +3082,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
freq->channel = channel; freq->channel = channel;
/* Setup higher BW only for 5 GHz */ /* Setup higher BW only for 5 GHz */
if (mode->mode == HOSTAPD_MODE_IEEE80211A) { if (mode->mode == HOSTAPD_MODE_IEEE80211A) {

View File

@ -68,7 +68,7 @@ Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
if (!chan) { if (!chan) {
--- a/src/drivers/driver_nl80211.c --- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c
@@ -10739,6 +10739,10 @@ static int nl80211_switch_channel(void * @@ -10977,6 +10977,10 @@ static int nl80211_switch_channel(void *
if (ret) if (ret)
goto error; goto error;

View File

@ -1,6 +1,6 @@
--- a/src/ap/ieee802_11.c --- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c
@@ -4168,6 +4168,13 @@ static int add_associated_sta(struct hos @@ -4601,6 +4601,13 @@ static int add_associated_sta(struct hos
* drivers to accept the STA parameter configuration. Since this is * drivers to accept the STA parameter configuration. Since this is
* after a new FT-over-DS exchange, a new TK has been derived, so key * after a new FT-over-DS exchange, a new TK has been derived, so key
* reinstallation is not a concern for this case. * reinstallation is not a concern for this case.
@ -14,7 +14,7 @@
*/ */
wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
" (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)", " (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
@@ -4181,7 +4188,8 @@ static int add_associated_sta(struct hos @@ -4614,7 +4621,8 @@ static int add_associated_sta(struct hos
(!(sta->flags & WLAN_STA_AUTHORIZED) || (!(sta->flags & WLAN_STA_AUTHORIZED) ||
(reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) || (reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
(!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) && (!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&

View File

@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/src/ap/hostapd.c --- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c +++ b/src/ap/hostapd.c
@@ -3562,7 +3562,7 @@ static int hostapd_change_config_freq(st @@ -3764,7 +3764,7 @@ static int hostapd_change_config_freq(st
struct hostapd_freq_params *old_params) struct hostapd_freq_params *old_params)
{ {
int channel; int channel;

View File

@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#include <netpacket/packet.h> #include <netpacket/packet.h>
#include <linux/errqueue.h> #include <linux/errqueue.h>
@@ -5590,26 +5587,29 @@ fail: @@ -5783,26 +5780,29 @@ fail:
static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr) static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
{ {
@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (err < 0) { if (err < 0) {
wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for " wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
MACSTR " ifindex=%d failed: %s", MAC2STR(addr), MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
@@ -5619,9 +5619,8 @@ static void rtnl_neigh_delete_fdb_entry( @@ -5812,9 +5812,8 @@ static void rtnl_neigh_delete_fdb_entry(
MACSTR, MAC2STR(addr)); MACSTR, MAC2STR(addr));
} }
@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
@@ -8275,7 +8274,6 @@ static void *i802_init(struct hostapd_da @@ -8492,7 +8491,6 @@ static void *i802_init(struct hostapd_da
(params->num_bridge == 0 || !params->bridge[0])) (params->num_bridge == 0 || !params->bridge[0]))
add_ifidx(drv, br_ifindex, drv->ifindex); add_ifidx(drv, br_ifindex, drv->ifindex);
@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (bss->added_if_into_bridge || bss->already_in_bridge) { if (bss->added_if_into_bridge || bss->already_in_bridge) {
int err; int err;
@@ -8292,7 +8290,6 @@ static void *i802_init(struct hostapd_da @@ -8509,7 +8507,6 @@ static void *i802_init(struct hostapd_da
goto failed; goto failed;
} }
} }
@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) { if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
wpa_printf(MSG_DEBUG, wpa_printf(MSG_DEBUG,
@@ -11605,13 +11602,14 @@ static int wpa_driver_br_add_ip_neigh(vo @@ -11843,13 +11840,14 @@ static int wpa_driver_br_add_ip_neigh(vo
const u8 *ipaddr, int prefixlen, const u8 *ipaddr, int prefixlen,
const u8 *addr) const u8 *addr)
{ {
@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int res; int res;
if (!ipaddr || prefixlen == 0 || !addr) if (!ipaddr || prefixlen == 0 || !addr)
@@ -11630,85 +11628,66 @@ static int wpa_driver_br_add_ip_neigh(vo @@ -11868,85 +11866,66 @@ static int wpa_driver_br_add_ip_neigh(vo
} }
if (version == 4) { if (version == 4) {
@ -220,7 +220,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
addrsize = 16; addrsize = 16;
} else { } else {
return -EINVAL; return -EINVAL;
@@ -11726,41 +11705,30 @@ static int wpa_driver_br_delete_ip_neigh @@ -11964,41 +11943,30 @@ static int wpa_driver_br_delete_ip_neigh
return -1; return -1;
} }

View File

@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/src/ap/ieee802_11.c --- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c
@@ -2948,15 +2948,6 @@ static void handle_auth(struct hostapd_d @@ -3012,15 +3012,6 @@ static void handle_auth(struct hostapd_d
seq_ctrl); seq_ctrl);
return; return;
} }
@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
- sta->plink_state == PLINK_BLOCKED) { - sta->plink_state == PLINK_BLOCKED) {
- wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR - wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR
- " is blocked - drop Authentication frame", - " is blocked - drop Authentication frame",
- MAC2STR(mgmt->sa)); - MAC2STR(sa));
- return; - return;
- } - }
-#endif /* CONFIG_MESH */ -#endif /* CONFIG_MESH */

View File

@ -1,41 +0,0 @@
From c85ce84d942e1eabde33e120b18e5b1f1637b76e Mon Sep 17 00:00:00 2001
From: Nick Hainke <vincent@systemli.org>
Date: Tue, 14 Mar 2023 21:40:53 +0100
Subject: [PATCH] wpa_supplicant: fix compiling without IEEE8021X_EAPOL
If IEEE8021X_EAPOL is not defined wpa_supplicant will not compile with
following error:
events.c: In function 'wpa_supplicant_connect':
events.c:1827:14: warning: implicit declaration of function 'eap_is_wps_pbc_enrollee' [-Wimplicit-function-declaration]
1827 | if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
| ^~~~~~~~~~~~~~~~~~~~~~~
events.c:1827:43: error: 'struct wpa_ssid' has no member named 'eap'
1827 | if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
| ^~
Adding ifdef statements around the calling function fixes the issue.
Signed-off-by: Nick Hainke <vincent@systemli.org>
---
wpa_supplicant/events.c | 2 ++
1 file changed, 2 insertions(+)
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1824,6 +1824,7 @@ int wpa_supplicant_connect(struct wpa_su
struct wpa_bss *selected,
struct wpa_ssid *ssid)
{
+#ifdef IEEE8021X_EAPOL
if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
wpas_wps_partner_link_overlap_detect(wpa_s)) ||
wpas_wps_scan_pbc_overlap(wpa_s, selected, ssid)) {
@@ -1846,6 +1847,7 @@ int wpa_supplicant_connect(struct wpa_su
#endif /* CONFIG_WPS */
return -1;
}
+#endif /* IEEE8021X_EAPOL */
wpa_msg(wpa_s, MSG_DEBUG,
"Considering connect request: reassociate: %d selected: "

View File

@ -156,7 +156,7 @@
wpa_cli.exe: wpa_cli wpa_cli.exe: wpa_cli
--- a/src/drivers/driver.h --- a/src/drivers/driver.h
+++ b/src/drivers/driver.h +++ b/src/drivers/driver.h
@@ -6544,8 +6544,8 @@ union wpa_event_data { @@ -6651,8 +6651,8 @@ union wpa_event_data {
* Driver wrapper code should call this function whenever an event is received * Driver wrapper code should call this function whenever an event is received
* from the driver. * from the driver.
*/ */
@ -167,7 +167,7 @@
/** /**
* wpa_supplicant_event_global - Report a driver event for wpa_supplicant * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
@@ -6557,7 +6557,7 @@ void wpa_supplicant_event(void *ctx, enu @@ -6664,7 +6664,7 @@ void wpa_supplicant_event(void *ctx, enu
* Same as wpa_supplicant_event(), but we search for the interface in * Same as wpa_supplicant_event(), but we search for the interface in
* wpa_global. * wpa_global.
*/ */
@ -178,7 +178,7 @@
/* /*
--- a/src/ap/drv_callbacks.c --- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c
@@ -1887,8 +1887,8 @@ err: @@ -1994,8 +1994,8 @@ err:
#endif /* CONFIG_OWE */ #endif /* CONFIG_OWE */
@ -189,7 +189,7 @@
{ {
struct hostapd_data *hapd = ctx; struct hostapd_data *hapd = ctx;
#ifndef CONFIG_NO_STDOUT_DEBUG #ifndef CONFIG_NO_STDOUT_DEBUG
@@ -2161,7 +2161,7 @@ void wpa_supplicant_event(void *ctx, enu @@ -2271,7 +2271,7 @@ void wpa_supplicant_event(void *ctx, enu
} }
@ -231,7 +231,7 @@
os_memset(&global, 0, sizeof(global)); os_memset(&global, 0, sizeof(global));
--- a/wpa_supplicant/events.c --- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c
@@ -5237,8 +5237,8 @@ static void wpas_event_unprot_beacon(str @@ -5345,8 +5345,8 @@ static void wpas_link_reconfig(struct wp
} }
@ -242,7 +242,7 @@
{ {
struct wpa_supplicant *wpa_s = ctx; struct wpa_supplicant *wpa_s = ctx;
int resched; int resched;
@@ -6149,7 +6149,7 @@ void wpa_supplicant_event(void *ctx, enu @@ -6264,7 +6264,7 @@ void wpa_supplicant_event(void *ctx, enu
} }
@ -253,7 +253,7 @@
struct wpa_supplicant *wpa_s; struct wpa_supplicant *wpa_s;
--- a/wpa_supplicant/wpa_supplicant.c --- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c
@@ -7408,7 +7408,6 @@ struct wpa_interface * wpa_supplicant_ma @@ -7435,7 +7435,6 @@ struct wpa_interface * wpa_supplicant_ma
return NULL; return NULL;
} }
@ -261,7 +261,7 @@
/** /**
* wpa_supplicant_match_existing - Match existing interfaces * wpa_supplicant_match_existing - Match existing interfaces
* @global: Pointer to global data from wpa_supplicant_init() * @global: Pointer to global data from wpa_supplicant_init()
@@ -7443,6 +7442,11 @@ static int wpa_supplicant_match_existing @@ -7470,6 +7469,11 @@ static int wpa_supplicant_match_existing
#endif /* CONFIG_MATCH_IFACE */ #endif /* CONFIG_MATCH_IFACE */
@ -273,7 +273,7 @@
/** /**
* wpa_supplicant_add_iface - Add a new network interface * wpa_supplicant_add_iface - Add a new network interface
@@ -7699,6 +7703,8 @@ struct wpa_global * wpa_supplicant_init( @@ -7726,6 +7730,8 @@ struct wpa_global * wpa_supplicant_init(
#ifndef CONFIG_NO_WPA_MSG #ifndef CONFIG_NO_WPA_MSG
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb); wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
#endif /* CONFIG_NO_WPA_MSG */ #endif /* CONFIG_NO_WPA_MSG */
@ -284,7 +284,7 @@
wpa_debug_open_file(params->wpa_debug_file_path); wpa_debug_open_file(params->wpa_debug_file_path);
--- a/hostapd/main.c --- a/hostapd/main.c
+++ b/hostapd/main.c +++ b/hostapd/main.c
@@ -595,6 +595,11 @@ fail: @@ -685,6 +685,11 @@ fail:
return -1; return -1;
} }
@ -296,7 +296,7 @@
#ifdef CONFIG_WPS #ifdef CONFIG_WPS
static int gen_uuid(const char *txt_addr) static int gen_uuid(const char *txt_addr)
@@ -688,6 +693,8 @@ int main(int argc, char *argv[]) @@ -778,6 +783,8 @@ int main(int argc, char *argv[])
return -1; return -1;
#endif /* CONFIG_DPP */ #endif /* CONFIG_DPP */

View File

@ -13,7 +13,7 @@
} else if (os_strcmp(buf, "ht_capab") == 0) { } else if (os_strcmp(buf, "ht_capab") == 0) {
--- a/src/ap/ap_config.h --- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h +++ b/src/ap/ap_config.h
@@ -1061,6 +1061,8 @@ struct hostapd_config { @@ -1072,6 +1072,8 @@ struct hostapd_config {
int ht_op_mode_fixed; int ht_op_mode_fixed;
u16 ht_capab; u16 ht_capab;

View File

@ -1,6 +1,6 @@
--- a/wpa_supplicant/config.c --- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c
@@ -2599,6 +2599,7 @@ static const struct parse_data ssid_fiel @@ -2600,6 +2600,7 @@ static const struct parse_data ssid_fiel
#else /* CONFIG_MESH */ #else /* CONFIG_MESH */
{ INT_RANGE(mode, 0, 4) }, { INT_RANGE(mode, 0, 4) },
#endif /* CONFIG_MESH */ #endif /* CONFIG_MESH */
@ -31,7 +31,7 @@
/* /*
--- a/wpa_supplicant/wpa_supplicant.c --- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c
@@ -2693,7 +2693,7 @@ static bool ibss_mesh_can_use_vht(struct @@ -2710,7 +2710,7 @@ static bool ibss_mesh_can_use_vht(struct
const struct wpa_ssid *ssid, const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode) struct hostapd_hw_modes *mode)
{ {
@ -40,7 +40,7 @@
return false; return false;
if (!drv_supports_vht(wpa_s, ssid)) if (!drv_supports_vht(wpa_s, ssid))
@@ -2766,7 +2766,7 @@ static void ibss_mesh_select_40mhz(struc @@ -2783,7 +2783,7 @@ static void ibss_mesh_select_40mhz(struc
int i, res; int i, res;
unsigned int j; unsigned int j;
static const int ht40plus[] = { static const int ht40plus[] = {
@ -49,7 +49,7 @@
184, 192 184, 192
}; };
int ht40 = -1; int ht40 = -1;
@@ -3016,7 +3016,7 @@ void ibss_mesh_setup_freq(struct wpa_sup @@ -3033,7 +3033,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode); int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
enum hostapd_hw_mode hw_mode; enum hostapd_hw_mode hw_mode;
struct hostapd_hw_modes *mode = NULL; struct hostapd_hw_modes *mode = NULL;

View File

@ -1,6 +1,6 @@
--- a/wpa_supplicant/wpa_supplicant.c --- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c
@@ -5713,7 +5713,7 @@ wpa_supplicant_alloc(struct wpa_supplica @@ -5740,7 +5740,7 @@ wpa_supplicant_alloc(struct wpa_supplica
if (wpa_s == NULL) if (wpa_s == NULL)
return NULL; return NULL;
wpa_s->scan_req = INITIAL_SCAN_REQ; wpa_s->scan_req = INITIAL_SCAN_REQ;

View File

@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c --- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c
@@ -5224,7 +5224,7 @@ static int nl80211_set_channel(struct i8 @@ -5407,7 +5407,7 @@ static int nl80211_set_channel(struct i8
freq->he_enabled, freq->eht_enabled, freq->bandwidth, freq->he_enabled, freq->eht_enabled, freq->bandwidth,
freq->center_freq1, freq->center_freq2); freq->center_freq1, freq->center_freq2);

View File

@ -1,6 +1,6 @@
--- a/src/ap/hostapd.c --- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c +++ b/src/ap/hostapd.c
@@ -142,6 +142,29 @@ static void hostapd_reload_bss(struct ho @@ -143,6 +143,29 @@ static void hostapd_reload_bss(struct ho
#endif /* CONFIG_NO_RADIUS */ #endif /* CONFIG_NO_RADIUS */
ssid = &hapd->conf->ssid; ssid = &hapd->conf->ssid;
@ -30,7 +30,7 @@
if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next && if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
ssid->wpa_passphrase_set && ssid->wpa_passphrase) { ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
/* /*
@@ -250,6 +273,7 @@ int hostapd_reload_config(struct hostapd @@ -251,6 +274,7 @@ int hostapd_reload_config(struct hostapd
struct hostapd_data *hapd = iface->bss[0]; struct hostapd_data *hapd = iface->bss[0];
struct hostapd_config *newconf, *oldconf; struct hostapd_config *newconf, *oldconf;
size_t j; size_t j;
@ -38,7 +38,7 @@
if (iface->config_fname == NULL) { if (iface->config_fname == NULL) {
/* Only in-memory config in use - assume it has been updated */ /* Only in-memory config in use - assume it has been updated */
@@ -300,6 +324,17 @@ int hostapd_reload_config(struct hostapd @@ -301,6 +325,17 @@ int hostapd_reload_config(struct hostapd
} }
iface->conf = newconf; iface->conf = newconf;
@ -56,7 +56,7 @@
for (j = 0; j < iface->num_bss; j++) { for (j = 0; j < iface->num_bss; j++) {
hapd = iface->bss[j]; hapd = iface->bss[j];
if (!hapd->conf->config_id || !newconf->bss[j]->config_id || if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
@@ -307,21 +342,6 @@ int hostapd_reload_config(struct hostapd @@ -308,21 +343,6 @@ int hostapd_reload_config(struct hostapd
newconf->bss[j]->config_id) != 0) newconf->bss[j]->config_id) != 0)
hostapd_clear_old_bss(hapd); hostapd_clear_old_bss(hapd);
hapd->iconf = newconf; hapd->iconf = newconf;

View File

@ -1,6 +1,6 @@
--- a/src/drivers/driver_nl80211.c --- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c
@@ -3006,12 +3006,12 @@ static int wpa_driver_nl80211_del_beacon @@ -3008,12 +3008,12 @@ static int wpa_driver_nl80211_del_beacon
return 0; return 0;
wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)", wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
@ -15,7 +15,7 @@
if (!msg) if (!msg)
return -ENOBUFS; return -ENOBUFS;
@@ -5907,7 +5907,7 @@ static void nl80211_teardown_ap(struct i @@ -6100,7 +6100,7 @@ static void nl80211_teardown_ap(struct i
nl80211_mgmt_unsubscribe(bss, "AP teardown"); nl80211_mgmt_unsubscribe(bss, "AP teardown");
nl80211_put_wiphy_data_ap(bss); nl80211_put_wiphy_data_ap(bss);
@ -24,7 +24,7 @@
} }
@@ -8642,8 +8642,6 @@ static int wpa_driver_nl80211_if_remove( @@ -8859,8 +8859,6 @@ static int wpa_driver_nl80211_if_remove(
} else { } else {
wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context"); wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
nl80211_teardown_ap(bss); nl80211_teardown_ap(bss);

View File

@ -78,7 +78,7 @@
#ifdef NEED_AP_MLME #ifdef NEED_AP_MLME
static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd, static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd,
@@ -3529,6 +3586,8 @@ static int hostapd_ctrl_iface_receive_pr @@ -3564,6 +3621,8 @@ static int hostapd_ctrl_iface_receive_pr
} else if (os_strncmp(buf, "VENDOR ", 7) == 0) { } else if (os_strncmp(buf, "VENDOR ", 7) == 0) {
reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply, reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply,
reply_size); reply_size);
@ -89,7 +89,7 @@
#ifdef RADIUS_SERVER #ifdef RADIUS_SERVER
--- a/src/ap/ctrl_iface_ap.c --- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c +++ b/src/ap/ctrl_iface_ap.c
@@ -1008,7 +1008,13 @@ int hostapd_parse_csa_settings(const cha @@ -1023,7 +1023,13 @@ int hostapd_parse_csa_settings(const cha
int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd) int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
{ {

View File

@ -172,7 +172,7 @@
wpa_s->new_connection = 1; wpa_s->new_connection = 1;
wpa_drv_set_operstate(wpa_s, 0); wpa_drv_set_operstate(wpa_s, 0);
#ifndef IEEE8021X_EAPOL #ifndef IEEE8021X_EAPOL
@@ -2520,6 +2572,8 @@ void wpa_supplicant_associate(struct wpa @@ -2537,6 +2589,8 @@ void wpa_supplicant_associate(struct wpa
return; return;
} }
wpa_s->current_bss = bss; wpa_s->current_bss = bss;
@ -181,7 +181,7 @@
#else /* CONFIG_MESH */ #else /* CONFIG_MESH */
wpa_msg(wpa_s, MSG_ERROR, wpa_msg(wpa_s, MSG_ERROR,
"mesh mode support not included in the build"); "mesh mode support not included in the build");
@@ -7010,6 +7064,16 @@ static int wpa_supplicant_init_iface(str @@ -7037,6 +7091,16 @@ static int wpa_supplicant_init_iface(str
sizeof(wpa_s->bridge_ifname)); sizeof(wpa_s->bridge_ifname));
} }
@ -198,7 +198,7 @@
/* RSNA Supplicant Key Management - INITIALIZE */ /* RSNA Supplicant Key Management - INITIALIZE */
eapol_sm_notify_portEnabled(wpa_s->eapol, false); eapol_sm_notify_portEnabled(wpa_s->eapol, false);
eapol_sm_notify_portValid(wpa_s->eapol, false); eapol_sm_notify_portValid(wpa_s->eapol, false);
@@ -7352,6 +7416,11 @@ static void wpa_supplicant_deinit_iface( @@ -7379,6 +7443,11 @@ static void wpa_supplicant_deinit_iface(
if (terminate) if (terminate)
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING); wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
@ -235,7 +235,7 @@
--- a/hostapd/ctrl_iface.c --- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c
@@ -2716,6 +2716,12 @@ static int hostapd_ctrl_iface_chan_switc @@ -2751,6 +2751,12 @@ static int hostapd_ctrl_iface_chan_switc
return 0; return 0;
} }
@ -250,7 +250,7 @@
/* Save CHAN_SWITCH VHT, HE, and EHT config */ /* Save CHAN_SWITCH VHT, HE, and EHT config */
--- a/src/ap/beacon.c --- a/src/ap/beacon.c
+++ b/src/ap/beacon.c +++ b/src/ap/beacon.c
@@ -2052,11 +2052,6 @@ static int __ieee802_11_set_beacon(struc @@ -2108,11 +2108,6 @@ static int __ieee802_11_set_beacon(struc
return -1; return -1;
} }
@ -264,7 +264,7 @@
if (ieee802_11_build_ap_params(hapd, &params) < 0) if (ieee802_11_build_ap_params(hapd, &params) < 0)
--- a/wpa_supplicant/events.c --- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c
@@ -5237,6 +5237,60 @@ static void wpas_event_unprot_beacon(str @@ -5345,6 +5345,60 @@ static void wpas_link_reconfig(struct wp
} }
@ -325,7 +325,7 @@
void supplicant_event(void *ctx, enum wpa_event_type event, void supplicant_event(void *ctx, enum wpa_event_type event,
union wpa_event_data *data) union wpa_event_data *data)
{ {
@@ -5586,8 +5640,10 @@ void supplicant_event(void *ctx, enum wp @@ -5697,8 +5751,10 @@ void supplicant_event(void *ctx, enum wp
channel_width_to_string(data->ch_switch.ch_width), channel_width_to_string(data->ch_switch.ch_width),
data->ch_switch.cf1, data->ch_switch.cf1,
data->ch_switch.cf2); data->ch_switch.cf2);
@ -339,7 +339,7 @@
wpa_s->current_ssid->frequency = data->ch_switch.freq; wpa_s->current_ssid->frequency = data->ch_switch.freq;
--- a/src/drivers/driver.h --- a/src/drivers/driver.h
+++ b/src/drivers/driver.h +++ b/src/drivers/driver.h
@@ -6324,6 +6324,7 @@ union wpa_event_data { @@ -6421,6 +6421,7 @@ union wpa_event_data {
/** /**
* struct ch_switch * struct ch_switch
@ -347,7 +347,7 @@
* @freq: Frequency of new channel in MHz * @freq: Frequency of new channel in MHz
* @ht_enabled: Whether this is an HT channel * @ht_enabled: Whether this is an HT channel
* @ch_offset: Secondary channel offset * @ch_offset: Secondary channel offset
@@ -6334,6 +6335,7 @@ union wpa_event_data { @@ -6431,6 +6432,7 @@ union wpa_event_data {
* @punct_bitmap: Puncturing bitmap * @punct_bitmap: Puncturing bitmap
*/ */
struct ch_switch { struct ch_switch {
@ -357,7 +357,7 @@
int ch_offset; int ch_offset;
--- a/src/drivers/driver_nl80211_event.c --- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c
@@ -997,6 +997,7 @@ static void mlme_event_ch_switch(struct @@ -1202,6 +1202,7 @@ static void mlme_event_ch_switch(struct
struct nlattr *bw, struct nlattr *cf1, struct nlattr *bw, struct nlattr *cf1,
struct nlattr *cf2, struct nlattr *cf2,
struct nlattr *punct_bitmap, struct nlattr *punct_bitmap,
@ -365,7 +365,7 @@
int finished) int finished)
{ {
struct i802_bss *bss; struct i802_bss *bss;
@@ -1060,6 +1061,8 @@ static void mlme_event_ch_switch(struct @@ -1265,6 +1266,8 @@ static void mlme_event_ch_switch(struct
data.ch_switch.cf1 = nla_get_u32(cf1); data.ch_switch.cf1 = nla_get_u32(cf1);
if (cf2) if (cf2)
data.ch_switch.cf2 = nla_get_u32(cf2); data.ch_switch.cf2 = nla_get_u32(cf2);
@ -374,7 +374,7 @@
if (finished) if (finished)
bss->flink->freq = data.ch_switch.freq; bss->flink->freq = data.ch_switch.freq;
@@ -3604,6 +3607,7 @@ static void do_process_drv_event(struct @@ -3848,6 +3851,7 @@ static void do_process_drv_event(struct
tb[NL80211_ATTR_CENTER_FREQ1], tb[NL80211_ATTR_CENTER_FREQ1],
tb[NL80211_ATTR_CENTER_FREQ2], tb[NL80211_ATTR_CENTER_FREQ2],
tb[NL80211_ATTR_PUNCT_BITMAP], tb[NL80211_ATTR_PUNCT_BITMAP],
@ -382,7 +382,7 @@
0); 0);
break; break;
case NL80211_CMD_CH_SWITCH_NOTIFY: case NL80211_CMD_CH_SWITCH_NOTIFY:
@@ -3616,6 +3620,7 @@ static void do_process_drv_event(struct @@ -3860,6 +3864,7 @@ static void do_process_drv_event(struct
tb[NL80211_ATTR_CENTER_FREQ1], tb[NL80211_ATTR_CENTER_FREQ1],
tb[NL80211_ATTR_CENTER_FREQ2], tb[NL80211_ATTR_CENTER_FREQ2],
tb[NL80211_ATTR_PUNCT_BITMAP], tb[NL80211_ATTR_PUNCT_BITMAP],

View File

@ -12,7 +12,7 @@
else else
--- a/hostapd/ctrl_iface.c --- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c
@@ -3342,6 +3342,7 @@ static int hostapd_ctrl_iface_receive_pr @@ -3377,6 +3377,7 @@ static int hostapd_ctrl_iface_receive_pr
reply_size); reply_size);
} else if (os_strcmp(buf, "STATUS-DRIVER") == 0) { } else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
reply_len = hostapd_drv_status(hapd, reply, reply_size); reply_len = hostapd_drv_status(hapd, reply, reply_size);
@ -20,7 +20,7 @@
} else if (os_strcmp(buf, "MIB") == 0) { } else if (os_strcmp(buf, "MIB") == 0) {
reply_len = ieee802_11_get_mib(hapd, reply, reply_size); reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
if (reply_len >= 0) { if (reply_len >= 0) {
@@ -3383,6 +3384,7 @@ static int hostapd_ctrl_iface_receive_pr @@ -3418,6 +3419,7 @@ static int hostapd_ctrl_iface_receive_pr
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) { } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply, reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
reply_size); reply_size);
@ -172,7 +172,7 @@
if (os_snprintf_error(buflen - len, ret)) if (os_snprintf_error(buflen - len, ret))
--- a/src/ap/ieee802_1x.c --- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c
@@ -2753,6 +2753,7 @@ static const char * bool_txt(bool val) @@ -2834,6 +2834,7 @@ static const char * bool_txt(bool val)
return val ? "TRUE" : "FALSE"; return val ? "TRUE" : "FALSE";
} }
@ -180,7 +180,7 @@
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
{ {
@@ -2939,6 +2940,7 @@ int ieee802_1x_get_mib_sta(struct hostap @@ -3020,6 +3021,7 @@ int ieee802_1x_get_mib_sta(struct hostap
return len; return len;
} }
@ -190,7 +190,7 @@
static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx) static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
--- a/src/ap/wpa_auth.c --- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c
@@ -4786,6 +4786,7 @@ static const char * wpa_bool_txt(int val @@ -5328,6 +5328,7 @@ static const char * wpa_bool_txt(int val
return val ? "TRUE" : "FALSE"; return val ? "TRUE" : "FALSE";
} }
@ -198,7 +198,7 @@
#define RSN_SUITE "%02x-%02x-%02x-%d" #define RSN_SUITE "%02x-%02x-%02x-%d"
#define RSN_SUITE_ARG(s) \ #define RSN_SUITE_ARG(s) \
@@ -4938,7 +4939,7 @@ int wpa_get_mib_sta(struct wpa_state_mac @@ -5480,7 +5481,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
return len; return len;
} }

View File

@ -9,7 +9,7 @@
struct hapd_global { struct hapd_global {
void **drv_priv; void **drv_priv;
@@ -696,7 +696,7 @@ int main(int argc, char *argv[]) @@ -786,7 +786,7 @@ int main(int argc, char *argv[])
wpa_supplicant_event = hostapd_wpa_event; wpa_supplicant_event = hostapd_wpa_event;
wpa_supplicant_event_global = hostapd_wpa_event_global; wpa_supplicant_event_global = hostapd_wpa_event_global;
for (;;) { for (;;) {
@ -18,7 +18,7 @@
if (c < 0) if (c < 0)
break; break;
switch (c) { switch (c) {
@@ -733,6 +733,8 @@ int main(int argc, char *argv[]) @@ -823,6 +823,8 @@ int main(int argc, char *argv[])
break; break;
#endif /* CONFIG_DEBUG_LINUX_TRACING */ #endif /* CONFIG_DEBUG_LINUX_TRACING */
case 'v': case 'v':

View File

@ -24,16 +24,16 @@
/** /**
* hostapd_driver_init - Preparate driver interface * hostapd_driver_init - Preparate driver interface
@@ -164,6 +174,8 @@ static int hostapd_driver_init(struct ho @@ -217,6 +227,8 @@ static int hostapd_driver_init(struct ho
return -1;
} }
#endif /* CONFIG_IEEE80211BE */
+ hapd->setup_complete_cb = hostapd_setup_complete_cb; + hapd->setup_complete_cb = hostapd_setup_complete_cb;
+ +
/* Initialize the driver interface */ /* Initialize the driver interface */
if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5])) if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
b = NULL; b = NULL;
@@ -407,8 +419,6 @@ static void hostapd_global_deinit(const @@ -497,8 +509,6 @@ static void hostapd_global_deinit(const
#endif /* CONFIG_NATIVE_WINDOWS */ #endif /* CONFIG_NATIVE_WINDOWS */
eap_server_unregister_methods(); eap_server_unregister_methods();
@ -42,7 +42,7 @@
} }
@@ -434,18 +444,6 @@ static int hostapd_global_run(struct hap @@ -524,18 +534,6 @@ static int hostapd_global_run(struct hap
} }
#endif /* EAP_SERVER_TNC */ #endif /* EAP_SERVER_TNC */
@ -61,7 +61,7 @@
eloop_run(); eloop_run();
return 0; return 0;
@@ -649,8 +647,7 @@ int main(int argc, char *argv[]) @@ -739,8 +737,7 @@ int main(int argc, char *argv[])
struct hapd_interfaces interfaces; struct hapd_interfaces interfaces;
int ret = 1; int ret = 1;
size_t i, j; size_t i, j;

View File

@ -22,7 +22,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
#include "common/defs.h" #include "common/defs.h"
#include "common/ieee802_11_defs.h" #include "common/ieee802_11_defs.h"
#include "common/wpa_common.h" #include "common/wpa_common.h"
@@ -936,6 +937,9 @@ struct wpa_driver_associate_params { @@ -953,6 +954,9 @@ struct wpa_driver_associate_params {
* responsible for selecting with which BSS to associate. */ * responsible for selecting with which BSS to associate. */
const u8 *bssid; const u8 *bssid;
@ -140,7 +140,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
/* Helper macros for network block parser */ /* Helper macros for network block parser */
#ifdef OFFSET #ifdef OFFSET
@@ -2673,6 +2765,8 @@ static const struct parse_data ssid_fiel @@ -2674,6 +2766,8 @@ static const struct parse_data ssid_fiel
{ INT(ap_max_inactivity) }, { INT(ap_max_inactivity) },
{ INT(dtim_period) }, { INT(dtim_period) },
{ INT(beacon_int) }, { INT(beacon_int) },
@ -174,7 +174,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
* macsec_policy - Determines the policy for MACsec secure session * macsec_policy - Determines the policy for MACsec secure session
--- a/wpa_supplicant/wpa_supplicant.c --- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c
@@ -4177,6 +4177,12 @@ static void wpas_start_assoc_cb(struct w @@ -4203,6 +4203,12 @@ static void wpas_start_assoc_cb(struct w
params.beacon_int = ssid->beacon_int; params.beacon_int = ssid->beacon_int;
else else
params.beacon_int = wpa_s->conf->beacon_int; params.beacon_int = wpa_s->conf->beacon_int;

View File

@ -19,7 +19,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
--- a/src/drivers/driver.h --- a/src/drivers/driver.h
+++ b/src/drivers/driver.h +++ b/src/drivers/driver.h
@@ -1768,6 +1768,7 @@ struct wpa_driver_mesh_join_params { @@ -1827,6 +1827,7 @@ struct wpa_driver_mesh_join_params {
#define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008 #define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008
unsigned int flags; unsigned int flags;
bool handle_dfs; bool handle_dfs;
@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
struct wpa_driver_set_key_params { struct wpa_driver_set_key_params {
--- a/src/drivers/driver_nl80211.c --- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c
@@ -11388,6 +11388,18 @@ static int nl80211_put_mesh_id(struct nl @@ -11626,6 +11626,18 @@ static int nl80211_put_mesh_id(struct nl
} }
@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
static int nl80211_put_mesh_config(struct nl_msg *msg, static int nl80211_put_mesh_config(struct nl_msg *msg,
struct wpa_driver_mesh_bss_params *params) struct wpa_driver_mesh_bss_params *params)
{ {
@@ -11449,6 +11461,7 @@ static int nl80211_join_mesh(struct i802 @@ -11687,6 +11699,7 @@ static int nl80211_join_mesh(struct i802
nl80211_put_basic_rates(msg, params->basic_rates) || nl80211_put_basic_rates(msg, params->basic_rates) ||
nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) || nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
nl80211_put_beacon_int(msg, params->beacon_int) || nl80211_put_beacon_int(msg, params->beacon_int) ||

View File

@ -1,6 +1,6 @@
--- a/wpa_supplicant/wpa_supplicant.c --- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c
@@ -3077,6 +3077,10 @@ void ibss_mesh_setup_freq(struct wpa_sup @@ -3094,6 +3094,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
freq->freq = ssid->frequency; freq->freq = ssid->frequency;

View File

@ -1,6 +1,6 @@
--- a/src/ap/hostapd.h --- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h +++ b/src/ap/hostapd.h
@@ -162,6 +162,21 @@ struct hostapd_sae_commit_queue { @@ -163,6 +163,21 @@ struct hostapd_sae_commit_queue {
}; };
/** /**
@ -22,9 +22,9 @@
* struct hostapd_data - hostapd per-BSS data structure * struct hostapd_data - hostapd per-BSS data structure
*/ */
struct hostapd_data { struct hostapd_data {
@@ -175,6 +190,9 @@ struct hostapd_data { @@ -182,6 +197,9 @@ struct hostapd_data {
u8 own_addr[ETH_ALEN]; struct hostapd_data *mld_first_bss;
+ /* OpenWrt specific statistics */ + /* OpenWrt specific statistics */
+ struct hostapd_openwrt_stats openwrt_stats; + struct hostapd_openwrt_stats openwrt_stats;

View File

@ -31,7 +31,7 @@
}; };
enum hostapd_chan_status { enum hostapd_chan_status {
@@ -183,6 +184,7 @@ struct hostapd_data { @@ -184,6 +185,7 @@ struct hostapd_data {
struct hostapd_iface *iface; struct hostapd_iface *iface;
struct hostapd_config *iconf; struct hostapd_config *iconf;
struct hostapd_bss_config *conf; struct hostapd_bss_config *conf;
@ -39,7 +39,7 @@
int interface_added; /* virtual interface added for this BSS */ int interface_added; /* virtual interface added for this BSS */
unsigned int started:1; unsigned int started:1;
unsigned int disabled:1; unsigned int disabled:1;
@@ -682,6 +684,7 @@ hostapd_alloc_bss_data(struct hostapd_if @@ -695,6 +697,7 @@ hostapd_alloc_bss_data(struct hostapd_if
struct hostapd_bss_config *bss); struct hostapd_bss_config *bss);
int hostapd_setup_interface(struct hostapd_iface *iface); int hostapd_setup_interface(struct hostapd_iface *iface);
int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err); int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
@ -49,7 +49,7 @@
struct hostapd_iface * hostapd_alloc_iface(void); struct hostapd_iface * hostapd_alloc_iface(void);
--- a/src/ap/hostapd.c --- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c +++ b/src/ap/hostapd.c
@@ -435,6 +435,7 @@ void hostapd_free_hapd_data(struct hosta @@ -455,6 +455,7 @@ void hostapd_free_hapd_data(struct hosta
hapd->beacon_set_done = 0; hapd->beacon_set_done = 0;
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface); wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
@ -57,7 +57,7 @@
accounting_deinit(hapd); accounting_deinit(hapd);
hostapd_deinit_wpa(hapd); hostapd_deinit_wpa(hapd);
vlan_deinit(hapd); vlan_deinit(hapd);
@@ -1185,6 +1186,8 @@ static int hostapd_start_beacon(struct h @@ -1207,6 +1208,8 @@ static int hostapd_start_beacon(struct h
if (hapd->driver && hapd->driver->set_operstate) if (hapd->driver && hapd->driver->set_operstate)
hapd->driver->set_operstate(hapd->drv_priv, 1); hapd->driver->set_operstate(hapd->drv_priv, 1);
@ -66,7 +66,7 @@
return 0; return 0;
} }
@@ -2126,6 +2129,7 @@ static int hostapd_setup_interface_compl @@ -2295,6 +2298,7 @@ static int hostapd_setup_interface_compl
if (err) if (err)
goto fail; goto fail;
@ -74,15 +74,15 @@
wpa_printf(MSG_DEBUG, "Completing interface initialization"); wpa_printf(MSG_DEBUG, "Completing interface initialization");
if (iface->freq) { if (iface->freq) {
#ifdef NEED_AP_MLME #ifdef NEED_AP_MLME
@@ -2342,6 +2346,7 @@ dfs_offload: @@ -2514,6 +2518,7 @@ dfs_offload:
fail: fail:
wpa_printf(MSG_ERROR, "Interface initialization failed"); wpa_printf(MSG_ERROR, "Interface initialization failed");
+ hostapd_ubus_free_iface(iface); + hostapd_ubus_free_iface(iface);
hostapd_set_state(iface, HAPD_IFACE_DISABLED);
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED); if (iface->is_no_ir) {
#ifdef CONFIG_FST hostapd_set_state(iface, HAPD_IFACE_NO_IR);
@@ -2817,6 +2822,7 @@ void hostapd_interface_deinit_free(struc @@ -3004,6 +3009,7 @@ void hostapd_interface_deinit_free(struc
(unsigned int) iface->conf->num_bss); (unsigned int) iface->conf->num_bss);
driver = iface->bss[0]->driver; driver = iface->bss[0]->driver;
drv_priv = iface->bss[0]->drv_priv; drv_priv = iface->bss[0]->drv_priv;
@ -92,7 +92,7 @@
__func__, driver, drv_priv); __func__, driver, drv_priv);
--- a/src/ap/ieee802_11.c --- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c
@@ -2740,13 +2740,18 @@ static void handle_auth(struct hostapd_d @@ -2778,7 +2778,7 @@ static void handle_auth(struct hostapd_d
u16 auth_alg, auth_transaction, status_code; u16 auth_alg, auth_transaction, status_code;
u16 resp = WLAN_STATUS_SUCCESS; u16 resp = WLAN_STATUS_SUCCESS;
struct sta_info *sta = NULL; struct sta_info *sta = NULL;
@ -101,9 +101,10 @@
u16 fc; u16 fc;
const u8 *challenge = NULL; const u8 *challenge = NULL;
u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN]; u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN];
size_t resp_ies_len = 0; @@ -2787,6 +2787,11 @@ static void handle_auth(struct hostapd_d
u16 seq_ctrl;
struct radius_sta rad_info; struct radius_sta rad_info;
const u8 *dst, *sa, *bssid;
bool mld_sta = false;
+ struct hostapd_ubus_request req = { + struct hostapd_ubus_request req = {
+ .type = HOSTAPD_UBUS_AUTH_REQ, + .type = HOSTAPD_UBUS_AUTH_REQ,
+ .mgmt_frame = mgmt, + .mgmt_frame = mgmt,
@ -112,7 +113,7 @@
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) { if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)", wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
@@ -2914,6 +2919,13 @@ static void handle_auth(struct hostapd_d @@ -2978,6 +2983,13 @@ static void handle_auth(struct hostapd_d
resp = WLAN_STATUS_UNSPECIFIED_FAILURE; resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
goto fail; goto fail;
} }
@ -126,7 +127,7 @@
if (res == HOSTAPD_ACL_PENDING) if (res == HOSTAPD_ACL_PENDING)
return; return;
@@ -4695,7 +4707,7 @@ static void handle_assoc(struct hostapd_ @@ -5141,7 +5153,7 @@ static void handle_assoc(struct hostapd_
int resp = WLAN_STATUS_SUCCESS; int resp = WLAN_STATUS_SUCCESS;
u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE; u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE;
const u8 *pos; const u8 *pos;
@ -135,7 +136,7 @@
struct sta_info *sta; struct sta_info *sta;
u8 *tmp = NULL; u8 *tmp = NULL;
#ifdef CONFIG_FILS #ifdef CONFIG_FILS
@@ -4908,6 +4920,11 @@ static void handle_assoc(struct hostapd_ @@ -5354,6 +5366,11 @@ static void handle_assoc(struct hostapd_
left = res; left = res;
} }
#endif /* CONFIG_FILS */ #endif /* CONFIG_FILS */
@ -147,7 +148,7 @@
/* followed by SSID and Supported rates; and HT capabilities if 802.11n /* followed by SSID and Supported rates; and HT capabilities if 802.11n
* is used */ * is used */
@@ -5006,6 +5023,13 @@ static void handle_assoc(struct hostapd_ @@ -5452,6 +5469,13 @@ static void handle_assoc(struct hostapd_
} }
#endif /* CONFIG_FILS */ #endif /* CONFIG_FILS */
@ -161,26 +162,26 @@
fail: fail:
/* /*
@@ -5099,6 +5123,7 @@ static void handle_disassoc(struct hosta @@ -5733,6 +5757,7 @@ static void handle_disassoc(struct hosta
wpa_printf(MSG_DEBUG, "disassocation: STA=" MACSTR " reason_code=%d", (unsigned long) len);
MAC2STR(mgmt->sa), return;
le_to_host16(mgmt->u.disassoc.reason_code)); }
+ hostapd_ubus_notify(hapd, "disassoc", mgmt->sa); + hostapd_ubus_notify(hapd, "disassoc", mgmt->sa);
sta = ap_get_sta(hapd, mgmt->sa); sta = ap_get_sta(hapd, mgmt->sa);
if (sta == NULL) { if (!sta) {
@@ -5168,6 +5193,8 @@ static void handle_deauth(struct hostapd @@ -5764,6 +5789,8 @@ static void handle_deauth(struct hostapd
/* Clear the PTKSA cache entries for PASN */ /* Clear the PTKSA cache entries for PASN */
ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE); ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE);
+ hostapd_ubus_notify(hapd, "deauth", mgmt->sa); + hostapd_ubus_notify(hapd, "deauth", mgmt->sa);
+ +
sta = ap_get_sta(hapd, mgmt->sa); sta = ap_get_sta(hapd, mgmt->sa);
if (sta == NULL) { if (!sta) {
wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying " wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR
--- a/src/ap/beacon.c --- a/src/ap/beacon.c
+++ b/src/ap/beacon.c +++ b/src/ap/beacon.c
@@ -1006,6 +1006,12 @@ void handle_probe_req(struct hostapd_dat @@ -1036,6 +1036,12 @@ void handle_probe_req(struct hostapd_dat
u16 csa_offs[2]; u16 csa_offs[2];
size_t csa_offs_len; size_t csa_offs_len;
struct radius_sta rad_info; struct radius_sta rad_info;
@ -193,7 +194,7 @@
if (hapd->iconf->rssi_ignore_probe_request && ssi_signal && if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
ssi_signal < hapd->iconf->rssi_ignore_probe_request) ssi_signal < hapd->iconf->rssi_ignore_probe_request)
@@ -1192,6 +1198,12 @@ void handle_probe_req(struct hostapd_dat @@ -1222,6 +1228,12 @@ void handle_probe_req(struct hostapd_dat
} }
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
@ -234,7 +235,7 @@
wpabuf_free(sta->p2p_ie); wpabuf_free(sta->p2p_ie);
--- a/src/ap/sta_info.c --- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c +++ b/src/ap/sta_info.c
@@ -460,6 +460,7 @@ void ap_handle_timer(void *eloop_ctx, vo @@ -471,6 +471,7 @@ void ap_handle_timer(void *eloop_ctx, vo
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "deauthenticated due to " HOSTAPD_LEVEL_INFO, "deauthenticated due to "
"local deauth request"); "local deauth request");
@ -242,7 +243,7 @@
ap_free_sta(hapd, sta); ap_free_sta(hapd, sta);
return; return;
} }
@@ -615,6 +616,7 @@ skip_poll: @@ -626,6 +627,7 @@ skip_poll:
mlme_deauthenticate_indication( mlme_deauthenticate_indication(
hapd, sta, hapd, sta,
WLAN_REASON_PREV_AUTH_NOT_VALID); WLAN_REASON_PREV_AUTH_NOT_VALID);
@ -250,7 +251,7 @@
ap_free_sta(hapd, sta); ap_free_sta(hapd, sta);
break; break;
} }
@@ -1305,15 +1307,28 @@ void ap_sta_set_authorized(struct hostap @@ -1344,15 +1346,28 @@ void ap_sta_set_authorized(struct hostap
sta->addr, authorized, dev_addr); sta->addr, authorized, dev_addr);
if (authorized) { if (authorized) {
@ -279,7 +280,7 @@
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) { if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
os_snprintf(ip_addr, sizeof(ip_addr), os_snprintf(ip_addr, sizeof(ip_addr),
@@ -1323,6 +1338,13 @@ void ap_sta_set_authorized(struct hostap @@ -1362,6 +1377,13 @@ void ap_sta_set_authorized(struct hostap
} }
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
@ -293,7 +294,7 @@
keyid = ap_sta_wpa_get_keyid(hapd, sta); keyid = ap_sta_wpa_get_keyid(hapd, sta);
if (keyid) { if (keyid) {
os_snprintf(keyid_buf, sizeof(keyid_buf), os_snprintf(keyid_buf, sizeof(keyid_buf),
@@ -1341,17 +1363,19 @@ void ap_sta_set_authorized(struct hostap @@ -1380,17 +1402,19 @@ void ap_sta_set_authorized(struct hostap
dpp_pkhash, SHA256_MAC_LEN); dpp_pkhash, SHA256_MAC_LEN);
} }
@ -354,7 +355,7 @@
CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
--- a/wpa_supplicant/wpa_supplicant.c --- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c
@@ -7608,6 +7608,8 @@ struct wpa_supplicant * wpa_supplicant_a @@ -7635,6 +7635,8 @@ struct wpa_supplicant * wpa_supplicant_a
} }
#endif /* CONFIG_P2P */ #endif /* CONFIG_P2P */
@ -363,7 +364,7 @@
return wpa_s; return wpa_s;
} }
@@ -7634,6 +7636,8 @@ int wpa_supplicant_remove_iface(struct w @@ -7661,6 +7663,8 @@ int wpa_supplicant_remove_iface(struct w
struct wpa_supplicant *parent = wpa_s->parent; struct wpa_supplicant *parent = wpa_s->parent;
#endif /* CONFIG_MESH */ #endif /* CONFIG_MESH */
@ -372,7 +373,7 @@
/* Remove interface from the global list of interfaces */ /* Remove interface from the global list of interfaces */
prev = global->ifaces; prev = global->ifaces;
if (prev == wpa_s) { if (prev == wpa_s) {
@@ -7980,8 +7984,12 @@ int wpa_supplicant_run(struct wpa_global @@ -8007,8 +8011,12 @@ int wpa_supplicant_run(struct wpa_global
eloop_register_signal_terminate(wpa_supplicant_terminate, global); eloop_register_signal_terminate(wpa_supplicant_terminate, global);
eloop_register_signal_reconfig(wpa_supplicant_reconfig, global); eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
@ -433,7 +434,7 @@
--- a/hostapd/main.c --- a/hostapd/main.c
+++ b/hostapd/main.c +++ b/hostapd/main.c
@@ -901,6 +901,7 @@ int main(int argc, char *argv[]) @@ -991,6 +991,7 @@ int main(int argc, char *argv[])
} }
hostapd_global_ctrl_iface_init(&interfaces); hostapd_global_ctrl_iface_init(&interfaces);
@ -441,7 +442,7 @@
if (hostapd_global_run(&interfaces, daemonize, pid_file)) { if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
wpa_printf(MSG_ERROR, "Failed to start eloop"); wpa_printf(MSG_ERROR, "Failed to start eloop");
@@ -910,6 +911,7 @@ int main(int argc, char *argv[]) @@ -1000,6 +1001,7 @@ int main(int argc, char *argv[])
ret = 0; ret = 0;
out: out:
@ -574,7 +575,7 @@
} }
--- a/src/ap/sta_info.h --- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h +++ b/src/ap/sta_info.h
@@ -293,6 +293,7 @@ struct sta_info { @@ -322,6 +322,7 @@ struct sta_info {
#endif /* CONFIG_TESTING_OPTIONS */ #endif /* CONFIG_TESTING_OPTIONS */
#ifdef CONFIG_AIRTIME_POLICY #ifdef CONFIG_AIRTIME_POLICY
unsigned int airtime_weight; unsigned int airtime_weight;

View File

@ -20,7 +20,7 @@
} else if (os_strcmp(buf, "channel") == 0) { } else if (os_strcmp(buf, "channel") == 0) {
--- a/src/ap/ap_config.c --- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c +++ b/src/ap/ap_config.c
@@ -997,6 +997,7 @@ void hostapd_config_free(struct hostapd_ @@ -998,6 +998,7 @@ void hostapd_config_free(struct hostapd_
for (i = 0; i < conf->num_bss; i++) for (i = 0; i < conf->num_bss; i++)
hostapd_config_free_bss(conf->bss[i]); hostapd_config_free_bss(conf->bss[i]);
@ -30,7 +30,7 @@
os_free(conf->basic_rates); os_free(conf->basic_rates);
--- a/src/ap/ap_config.h --- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h +++ b/src/ap/ap_config.h
@@ -987,6 +987,7 @@ struct eht_phy_capabilities_info { @@ -998,6 +998,7 @@ struct eht_phy_capabilities_info {
struct hostapd_config { struct hostapd_config {
struct hostapd_bss_config **bss, *last_bss; struct hostapd_bss_config **bss, *last_bss;
size_t num_bss; size_t num_bss;
@ -40,7 +40,7 @@
int rts_threshold; int rts_threshold;
--- a/src/ap/hostapd.c --- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c +++ b/src/ap/hostapd.c
@@ -254,6 +254,10 @@ static int hostapd_iface_conf_changed(st @@ -255,6 +255,10 @@ static int hostapd_iface_conf_changed(st
{ {
size_t i; size_t i;
@ -51,7 +51,7 @@
if (newconf->num_bss != oldconf->num_bss) if (newconf->num_bss != oldconf->num_bss)
return 1; return 1;
@@ -267,7 +271,7 @@ static int hostapd_iface_conf_changed(st @@ -268,7 +272,7 @@ static int hostapd_iface_conf_changed(st
} }
@ -60,7 +60,7 @@
{ {
struct hapd_interfaces *interfaces = iface->interfaces; struct hapd_interfaces *interfaces = iface->interfaces;
struct hostapd_data *hapd = iface->bss[0]; struct hostapd_data *hapd = iface->bss[0];
@@ -295,6 +299,9 @@ int hostapd_reload_config(struct hostapd @@ -296,6 +300,9 @@ int hostapd_reload_config(struct hostapd
char *fname; char *fname;
int res; int res;
@ -70,7 +70,7 @@
hostapd_clear_old(iface); hostapd_clear_old(iface);
wpa_printf(MSG_DEBUG, wpa_printf(MSG_DEBUG,
@@ -321,6 +328,24 @@ int hostapd_reload_config(struct hostapd @@ -322,6 +329,24 @@ int hostapd_reload_config(struct hostapd
wpa_printf(MSG_ERROR, wpa_printf(MSG_ERROR,
"Failed to enable interface on config reload"); "Failed to enable interface on config reload");
return res; return res;
@ -95,7 +95,7 @@
} }
iface->conf = newconf; iface->conf = newconf;
@@ -337,6 +362,12 @@ int hostapd_reload_config(struct hostapd @@ -338,6 +363,12 @@ int hostapd_reload_config(struct hostapd
for (j = 0; j < iface->num_bss; j++) { for (j = 0; j < iface->num_bss; j++) {
hapd = iface->bss[j]; hapd = iface->bss[j];
@ -108,7 +108,7 @@
if (!hapd->conf->config_id || !newconf->bss[j]->config_id || if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
os_strcmp(hapd->conf->config_id, os_strcmp(hapd->conf->config_id,
newconf->bss[j]->config_id) != 0) newconf->bss[j]->config_id) != 0)
@@ -2514,6 +2545,10 @@ hostapd_alloc_bss_data(struct hostapd_if @@ -2700,6 +2731,10 @@ hostapd_alloc_bss_data(struct hostapd_if
hapd->iconf = conf; hapd->iconf = conf;
hapd->conf = bss; hapd->conf = bss;
hapd->iface = hapd_iface; hapd->iface = hapd_iface;
@ -130,7 +130,7 @@
struct hostapd_config * (*config_read_cb)(const char *config_fname); struct hostapd_config * (*config_read_cb)(const char *config_fname);
int (*ctrl_iface_init)(struct hostapd_data *hapd); int (*ctrl_iface_init)(struct hostapd_data *hapd);
void (*ctrl_iface_deinit)(struct hostapd_data *hapd); void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
@@ -185,6 +185,7 @@ struct hostapd_data { @@ -186,6 +186,7 @@ struct hostapd_data {
struct hostapd_config *iconf; struct hostapd_config *iconf;
struct hostapd_bss_config *conf; struct hostapd_bss_config *conf;
struct hostapd_ubus_bss ubus; struct hostapd_ubus_bss ubus;
@ -138,7 +138,7 @@
int interface_added; /* virtual interface added for this BSS */ int interface_added; /* virtual interface added for this BSS */
unsigned int started:1; unsigned int started:1;
unsigned int disabled:1; unsigned int disabled:1;
@@ -676,7 +677,7 @@ struct hostapd_iface { @@ -689,7 +690,7 @@ struct hostapd_iface {
int hostapd_for_each_interface(struct hapd_interfaces *interfaces, int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
int (*cb)(struct hostapd_iface *iface, int (*cb)(struct hostapd_iface *iface,
void *ctx), void *ctx); void *ctx), void *ctx);
@ -149,7 +149,7 @@
hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface, hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
--- a/src/drivers/driver_nl80211.c --- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c
@@ -5054,6 +5054,9 @@ static int wpa_driver_nl80211_set_ap(voi @@ -5322,6 +5322,9 @@ static int wpa_driver_nl80211_set_ap(voi
if (ret) { if (ret) {
wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)", wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
ret, strerror(-ret)); ret, strerror(-ret));
@ -157,7 +157,7 @@
+ ret = 0; + ret = 0;
+ bss->flink->beacon_set = 0; + bss->flink->beacon_set = 0;
} else { } else {
bss->flink->beacon_set = 1; link->beacon_set = 1;
nl80211_set_bss(bss, params->cts_protect, params->preamble, nl80211_set_bss(bss, params->cts_protect, params->preamble,
--- a/hostapd/ctrl_iface.c --- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c
@ -172,7 +172,7 @@
} }
--- a/hostapd/main.c --- a/hostapd/main.c
+++ b/hostapd/main.c +++ b/hostapd/main.c
@@ -320,7 +320,7 @@ static void handle_term(int sig, void *s @@ -410,7 +410,7 @@ static void handle_term(int sig, void *s
static int handle_reload_iface(struct hostapd_iface *iface, void *ctx) static int handle_reload_iface(struct hostapd_iface *iface, void *ctx)
{ {

View File

@ -17,7 +17,7 @@
} else if (os_strcmp(buf, "extended_key_id") == 0) { } else if (os_strcmp(buf, "extended_key_id") == 0) {
--- a/src/ap/hostapd.h --- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h +++ b/src/ap/hostapd.h
@@ -721,6 +721,7 @@ void hostapd_cleanup_cs_params(struct ho @@ -734,6 +734,7 @@ void hostapd_cleanup_cs_params(struct ho
void hostapd_periodic_iface(struct hostapd_iface *iface); void hostapd_periodic_iface(struct hostapd_iface *iface);
int hostapd_owe_trans_get_info(struct hostapd_data *hapd); int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx); void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
@ -27,7 +27,7 @@
void hostapd_cleanup_cca_params(struct hostapd_data *hapd); void hostapd_cleanup_cca_params(struct hostapd_data *hapd);
--- a/src/ap/hostapd.c --- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c +++ b/src/ap/hostapd.c
@@ -271,6 +271,30 @@ static int hostapd_iface_conf_changed(st @@ -272,6 +272,30 @@ static int hostapd_iface_conf_changed(st
} }
@ -60,7 +60,7 @@
struct hapd_interfaces *interfaces = iface->interfaces; struct hapd_interfaces *interfaces = iface->interfaces;
--- a/src/ap/beacon.c --- a/src/ap/beacon.c
+++ b/src/ap/beacon.c +++ b/src/ap/beacon.c
@@ -1222,7 +1222,7 @@ void handle_probe_req(struct hostapd_dat @@ -1252,7 +1252,7 @@ void handle_probe_req(struct hostapd_dat
if (hapd->conf->no_probe_resp_if_max_sta && if (hapd->conf->no_probe_resp_if_max_sta &&
is_multicast_ether_addr(mgmt->da) && is_multicast_ether_addr(mgmt->da) &&
is_multicast_ether_addr(mgmt->bssid) && is_multicast_ether_addr(mgmt->bssid) &&
@ -71,7 +71,7 @@
" since no room for additional STA", " since no room for additional STA",
--- a/src/ap/ap_config.h --- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h +++ b/src/ap/ap_config.h
@@ -1026,6 +1026,8 @@ struct hostapd_config { @@ -1037,6 +1037,8 @@ struct hostapd_config {
unsigned int track_sta_max_num; unsigned int track_sta_max_num;
unsigned int track_sta_max_age; unsigned int track_sta_max_age;

View File

@ -21,7 +21,7 @@
int bridge_hairpin; /* hairpin_mode on bridge members */ int bridge_hairpin; /* hairpin_mode on bridge members */
--- a/src/ap/wpa_auth_glue.c --- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c
@@ -1616,8 +1616,12 @@ int hostapd_setup_wpa(struct hostapd_dat @@ -1727,8 +1727,12 @@ int hostapd_setup_wpa(struct hostapd_dat
wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) { wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
const char *ft_iface; const char *ft_iface;

View File

@ -32,7 +32,7 @@
os_free(bss->dump_msk_file); os_free(bss->dump_msk_file);
--- a/src/ap/hostapd.c --- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c +++ b/src/ap/hostapd.c
@@ -1499,6 +1499,7 @@ static int hostapd_setup_bss(struct host @@ -1534,6 +1534,7 @@ static int hostapd_setup_bss(struct host
wpa_printf(MSG_ERROR, "GAS server initialization failed"); wpa_printf(MSG_ERROR, "GAS server initialization failed");
return -1; return -1;
} }
@ -40,7 +40,7 @@
if (conf->qos_map_set_len && if (conf->qos_map_set_len &&
hostapd_drv_set_qos_map(hapd, conf->qos_map_set, hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
@@ -1506,7 +1507,6 @@ static int hostapd_setup_bss(struct host @@ -1541,7 +1542,6 @@ static int hostapd_setup_bss(struct host
wpa_printf(MSG_ERROR, "Failed to initialize QoS Map"); wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
return -1; return -1;
} }
@ -50,7 +50,7 @@
wpa_printf(MSG_ERROR, "BSS Load initialization failed"); wpa_printf(MSG_ERROR, "BSS Load initialization failed");
--- a/wpa_supplicant/events.c --- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c
@@ -2672,8 +2672,6 @@ void wnm_bss_keep_alive_deinit(struct wp @@ -2683,8 +2683,6 @@ void wnm_bss_keep_alive_deinit(struct wp
} }
@ -59,7 +59,7 @@
static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map, static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map,
size_t len) size_t len)
{ {
@@ -2706,8 +2704,6 @@ static void interworking_process_assoc_r @@ -2717,8 +2715,6 @@ static void interworking_process_assoc_r
} }
} }
@ -68,7 +68,7 @@
static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s) static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s)
{ {
@@ -3087,10 +3083,8 @@ static int wpa_supplicant_event_associnf @@ -3098,10 +3094,8 @@ static int wpa_supplicant_event_associnf
wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies, wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
data->assoc_info.resp_ies_len); data->assoc_info.resp_ies_len);
#endif /* CONFIG_WNM */ #endif /* CONFIG_WNM */

View File

@ -1,6 +1,6 @@
--- a/src/ap/ap_drv_ops.c --- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c
@@ -874,7 +874,8 @@ int hostapd_start_dfs_cac(struct hostapd @@ -927,7 +927,8 @@ int hostapd_start_dfs_cac(struct hostapd
int hostapd_drv_set_qos_map(struct hostapd_data *hapd, int hostapd_drv_set_qos_map(struct hostapd_data *hapd,
const u8 *qos_map_set, u8 qos_map_set_len) const u8 *qos_map_set, u8 qos_map_set_len)
{ {

View File

@ -85,7 +85,7 @@
RadiusType msg_type, const u8 *addr); RadiusType msg_type, const u8 *addr);
--- a/src/ap/ieee802_1x.c --- a/src/ap/ieee802_1x.c
+++ b/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c
@@ -535,6 +535,10 @@ int add_common_radius_attr(struct hostap @@ -598,6 +598,10 @@ int add_common_radius_attr(struct hostap
struct hostapd_radius_attr *attr; struct hostapd_radius_attr *attr;
int len; int len;

View File

@ -10,14 +10,14 @@
unsigned int time_window; unsigned int time_window;
--- a/src/ap/hostapd.c --- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c +++ b/src/ap/hostapd.c
@@ -1442,6 +1442,7 @@ static int hostapd_setup_bss(struct host @@ -1471,6 +1471,7 @@ static int hostapd_setup_bss(struct host
struct radius_das_conf das_conf;
os_memset(&das_conf, 0, sizeof(das_conf)); os_memset(&das_conf, 0, sizeof(das_conf));
das_conf.port = conf->radius_das_port; das_conf.port = conf->radius_das_port;
+ das_conf.nas_identifier = conf->nas_identifier; + das_conf.nas_identifier = conf->nas_identifier;
das_conf.shared_secret = conf->radius_das_shared_secret; das_conf.shared_secret = conf->radius_das_shared_secret;
das_conf.shared_secret_len = das_conf.shared_secret_len =
conf->radius_das_shared_secret_len; conf->radius_das_shared_secret_len;
--- a/src/radius/radius_das.c --- a/src/radius/radius_das.c
+++ b/src/radius/radius_das.c +++ b/src/radius/radius_das.c
@@ -12,13 +12,26 @@ @@ -12,13 +12,26 @@