mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-31 08:25:29 +00:00
hostapd: update to latest Git hostap_2_9-1238-gdd2daf0848ed
Bump package to latest upstream Git HEAD which is commit dd2daf0848ed ("HE: Process HE 6 GHz band capab from associating HE STA"). Since last update there was 1238 commits done in the upstream tree with 618 files changed, 53399 insertions, 24928 deletions. I didn't bothered to rebase mesh patches as the changes seems not trivial and I don't have enough knowledge of those parts to do/test that properly, so someone else has to forward port them, ideally upstream them so we don't need to bother anymore. I've just deleted them for now: 004-mesh-use-setup-completion-callback-to-complete-mesh-.patch 005-mesh-update-ssid-frequency-as-pri-sec-channel-switch.patch 006-mesh-inform-kernel-driver-DFS-handler-in-userspace.patch 007-mesh-apply-channel-attributes-before-running-Mesh.patch 011-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch 013-mesh-do-not-allow-pri-sec-channel-switch.patch 015-mesh-do-not-use-offchan-mgmt-tx-on-DFS.patch 016-mesh-fix-channel-switch-error-during-CAC.patch 018-mesh-make-forwarding-configurable.patch Refreshed all other patches, removed upstreamed patches: 051-wpa_supplicant-fix-race-condition-in-mesh-mpm-new-pe.patch 067-0001-AP-Silently-ignore-management-frame-from-unexpected-.patch 070-driver_nl80211-fix-WMM-queue-mapping-for-regulatory-.patch 071-driver_nl80211-fix-regulatory-limits-for-wmm-cwmin-c.patch 090-wolfssl-fix-crypto_bignum_sum.patch 091-0001-wolfssl-Fix-compiler-warnings-on-size_t-printf-forma.patch 091-0002-wolfssl-Fix-crypto_bignum_rand-implementation.patch 091-0003-wolfssl-Do-not-hardcode-include-directory-in-wpa_sup.patch 800-usleep.patch Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq8065/NBG6817; ipq40xx/MAP-AC2200] Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
parent
5ff4b0d024
commit
0a3ec87a66
@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostapd
|
||||
PKG_RELEASE:=10
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2019-08-08
|
||||
PKG_SOURCE_VERSION:=ca8c2bd28ad53f431d6ee60ef754e98cfdb4c17b
|
||||
PKG_MIRROR_HASH:=9d9f1c60afa5324ee17219bd3ec61c1a6fa4043b4187da9bb44e59025d3ed31d
|
||||
PKG_SOURCE_DATE:=2020-05-20
|
||||
PKG_SOURCE_VERSION:=dd2daf0848ed8854065cc5cfca07a0538cd380af
|
||||
PKG_MIRROR_HASH:=5f198ba4f9098e8bddb32e41f82a24d0510c6e25317a86dcfafc70fb8db260e2
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
@ -1,124 +0,0 @@
|
||||
From c05ace7510ead96e72b97ce47b33f7b5865d6d36 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:38 -0700
|
||||
Subject: [PATCH 1/7] mesh: use setup completion callback to complete mesh join
|
||||
|
||||
mesh join function is the last function to be called during
|
||||
mesh join process, but it's been called a bit earlier than
|
||||
it's supposed to be, so that some mesh parameter values
|
||||
such as VHT capabilities not applied correct when mesh join
|
||||
is in process.
|
||||
Moreover current design of mesh join that is called directly
|
||||
after mesh initialization isn't suitable for DFS channels to use,
|
||||
since mesh join process should be paused until DFS CAC is
|
||||
done and resumed after it's done.
|
||||
The callback will be called by hostapd_setup_interface_complete_sync.
|
||||
There is possiblity that completing mesh init fails, so add error
|
||||
handle codes.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
src/ap/hostapd.c | 11 ++++++++++-
|
||||
wpa_supplicant/mesh.c | 13 +++++++------
|
||||
2 files changed, 17 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -423,6 +423,8 @@ static void hostapd_free_hapd_data(struc
|
||||
#ifdef CONFIG_MESH
|
||||
wpabuf_free(hapd->mesh_pending_auth);
|
||||
hapd->mesh_pending_auth = NULL;
|
||||
+ /* handling setup failure is already done */
|
||||
+ hapd->setup_complete_cb = NULL;
|
||||
#endif /* CONFIG_MESH */
|
||||
|
||||
hostapd_clean_rrm(hapd);
|
||||
@@ -2049,6 +2051,13 @@ dfs_offload:
|
||||
if (hapd->setup_complete_cb)
|
||||
hapd->setup_complete_cb(hapd->setup_complete_cb_ctx);
|
||||
|
||||
+#ifdef CONFIG_MESH
|
||||
+ if (delay_apply_cfg && !iface->mconf) {
|
||||
+ wpa_printf(MSG_ERROR, "Error while completing mesh init");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+#endif /* CONFIG_MESH */
|
||||
+
|
||||
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
|
||||
iface->bss[0]->conf->iface);
|
||||
if (iface->interfaces && iface->interfaces->terminate_on_error > 0)
|
||||
@@ -2192,7 +2201,7 @@ int hostapd_setup_interface(struct hosta
|
||||
ret = setup_interface(iface);
|
||||
if (ret) {
|
||||
wpa_printf(MSG_ERROR, "%s: Unable to setup interface.",
|
||||
- iface->bss[0]->conf->iface);
|
||||
+ iface->conf ? iface->conf->bss[0]->iface : "N/A");
|
||||
return -1;
|
||||
}
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -190,8 +190,9 @@ static int wpas_mesh_init_rsn(struct wpa
|
||||
}
|
||||
|
||||
|
||||
-static int wpas_mesh_complete(struct wpa_supplicant *wpa_s)
|
||||
+static void wpas_mesh_complete_cb(void *ctx)
|
||||
{
|
||||
+ struct wpa_supplicant *wpa_s = ctx;
|
||||
struct hostapd_iface *ifmsh = wpa_s->ifmsh;
|
||||
struct wpa_driver_mesh_join_params *params = wpa_s->mesh_params;
|
||||
struct wpa_ssid *ssid = wpa_s->current_ssid;
|
||||
@@ -200,7 +201,7 @@ static int wpas_mesh_complete(struct wpa
|
||||
if (!params || !ssid || !ifmsh) {
|
||||
wpa_printf(MSG_ERROR, "mesh: %s called without active mesh",
|
||||
__func__);
|
||||
- return -1;
|
||||
+ return;
|
||||
}
|
||||
|
||||
if (ifmsh->mconf->security != MESH_CONF_SEC_NONE &&
|
||||
@@ -209,7 +210,7 @@ static int wpas_mesh_complete(struct wpa
|
||||
"mesh: RSN initialization failed - deinit mesh");
|
||||
wpa_supplicant_mesh_deinit(wpa_s);
|
||||
wpa_drv_leave_mesh(wpa_s);
|
||||
- return -1;
|
||||
+ return;
|
||||
}
|
||||
|
||||
if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
|
||||
@@ -235,8 +236,6 @@ static int wpas_mesh_complete(struct wpa
|
||||
|
||||
if (!ret)
|
||||
wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
|
||||
-
|
||||
- return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -263,6 +262,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
if (!ifmsh)
|
||||
return -ENOMEM;
|
||||
|
||||
+ ifmsh->owner = wpa_s;
|
||||
ifmsh->drv_flags = wpa_s->drv_flags;
|
||||
ifmsh->num_bss = 1;
|
||||
ifmsh->bss = os_calloc(wpa_s->ifmsh->num_bss,
|
||||
@@ -280,6 +280,8 @@ static int wpa_supplicant_mesh_init(stru
|
||||
bss->drv_priv = wpa_s->drv_priv;
|
||||
bss->iface = ifmsh;
|
||||
bss->mesh_sta_free_cb = mesh_mpm_free_sta;
|
||||
+ bss->setup_complete_cb = wpas_mesh_complete_cb;
|
||||
+ bss->setup_complete_cb_ctx = wpa_s;
|
||||
frequency = ssid->frequency;
|
||||
if (frequency != freq->freq &&
|
||||
frequency == freq->freq + freq->sec_channel_offset * 20) {
|
||||
@@ -521,7 +523,6 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
goto out;
|
||||
}
|
||||
|
||||
- ret = wpas_mesh_complete(wpa_s);
|
||||
out:
|
||||
return ret;
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
From c56f18380d1d404a2abc0ea5373d294508ef1e54 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:41 -0700
|
||||
Subject: [PATCH 2/7] mesh: update ssid->frequency as pri/sec channel switch
|
||||
|
||||
ssid->frequency is one of variables used to gets channel
|
||||
number from given frequency. Leave it as unchanged when
|
||||
pri/sec channel switched will cause picking up wrong
|
||||
channel number after applying secondary channel offset
|
||||
for HT40 and leads failing interface bring-up.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
wpa_supplicant/mesh.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -287,6 +287,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
frequency == freq->freq + freq->sec_channel_offset * 20) {
|
||||
wpa_printf(MSG_DEBUG, "mesh: pri/sec channels switched");
|
||||
frequency = freq->freq;
|
||||
+ ssid->frequency = frequency;
|
||||
}
|
||||
wpa_s->assoc_freq = frequency;
|
||||
wpa_s->current_ssid = ssid;
|
@ -1,48 +0,0 @@
|
||||
From 593602b7f14be5c2695979639764b1c50f01bbec Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:49 -0700
|
||||
Subject: [PATCH 7/7] mesh: inform kernel driver DFS handler in userspace
|
||||
|
||||
NL80211_ATTR_HANDLE_DFS is required by kerenel space
|
||||
to enable DFS channels that indicates DFS handler
|
||||
resides in userspace.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
src/drivers/driver.h | 1 +
|
||||
src/drivers/driver_nl80211.c | 3 +++
|
||||
wpa_supplicant/mesh.c | 1 +
|
||||
3 files changed, 5 insertions(+)
|
||||
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -1477,6 +1477,7 @@ struct wpa_driver_mesh_join_params {
|
||||
#define WPA_DRIVER_MESH_FLAG_SAE_AUTH 0x00000004
|
||||
#define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008
|
||||
unsigned int flags;
|
||||
+ u8 handle_dfs;
|
||||
};
|
||||
|
||||
/**
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -9624,6 +9624,9 @@ static int nl80211_join_mesh(struct i802
|
||||
|
||||
wpa_printf(MSG_DEBUG, " * flags=%08X", params->flags);
|
||||
|
||||
+ if (params->handle_dfs)
|
||||
+ if (nla_put_flag(msg, NL80211_ATTR_HANDLE_DFS))
|
||||
+ goto fail;
|
||||
container = nla_nest_start(msg, NL80211_ATTR_MESH_SETUP);
|
||||
if (!container)
|
||||
goto fail;
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -309,6 +309,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
conf->country[0] = wpa_s->conf->country[0];
|
||||
conf->country[1] = wpa_s->conf->country[1];
|
||||
conf->country[2] = ' ';
|
||||
+ wpa_s->mesh_params->handle_dfs = 1;
|
||||
}
|
||||
|
||||
bss->iconf = conf;
|
@ -1,47 +0,0 @@
|
||||
From 2564184440d9d6041d11a8c7d50b31368634c3bd Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:40 -0700
|
||||
Subject: [PATCH] mesh: Apply channel attributes before setup interface
|
||||
|
||||
This helps mesh interface initialization with correct channel
|
||||
parameters.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
wpa_supplicant/mesh.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -249,7 +249,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
struct mesh_conf *mconf;
|
||||
int basic_rates_erp[] = { 10, 20, 55, 60, 110, 120, 240, -1 };
|
||||
int rate_len;
|
||||
- int frequency;
|
||||
+ int frequency, saved_freq;
|
||||
|
||||
if (!wpa_s->conf->user_mpm) {
|
||||
/* not much for us to do here */
|
||||
@@ -386,6 +386,13 @@ static int wpa_supplicant_mesh_init(stru
|
||||
conf->basic_rates[rate_len] = -1;
|
||||
}
|
||||
|
||||
+ /* Handle pri/sec switch frequency within AP configuration parameter
|
||||
+ * generation without changing the stored network profile in the end. */
|
||||
+ saved_freq = ssid->frequency;
|
||||
+ ssid->frequency = frequency;
|
||||
+ wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
|
||||
+ ssid->frequency = saved_freq;
|
||||
+
|
||||
if (wpa_drv_init_mesh(wpa_s)) {
|
||||
wpa_msg(wpa_s, MSG_ERROR, "Failed to init mesh in driver");
|
||||
return -1;
|
||||
@@ -397,8 +404,6 @@ static int wpa_supplicant_mesh_init(stru
|
||||
return -1;
|
||||
}
|
||||
|
||||
- wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
|
||||
-
|
||||
return 0;
|
||||
out_free:
|
||||
wpa_supplicant_mesh_deinit(wpa_s);
|
@ -1,78 +0,0 @@
|
||||
From 89fa0d75fb1be82330258082ed3d7fd452eb6076 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:45 -0700
|
||||
Subject: [PATCH 3/7] mesh: Allow DFS channels to be selected if dfs is enabled
|
||||
|
||||
Note: DFS is assumed to be usable if a country code has been set
|
||||
|
||||
Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
wpa_supplicant/wpa_supplicant.c | 24 ++++++++++++++++++------
|
||||
1 file changed, 18 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -2153,6 +2153,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
struct hostapd_freq_params vht_freq;
|
||||
int chwidth, seg0, seg1;
|
||||
u32 vht_caps = 0;
|
||||
+ int dfs_enabled = wpa_s->conf->country[0] &&
|
||||
+ (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
|
||||
|
||||
freq->freq = ssid->frequency;
|
||||
|
||||
@@ -2232,8 +2234,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
return;
|
||||
|
||||
/* Check primary channel flags */
|
||||
- if (pri_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
|
||||
+ if (pri_chan->flag & HOSTAPD_CHAN_DISABLED)
|
||||
return;
|
||||
+ if (pri_chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
|
||||
+ if (!dfs_enabled)
|
||||
+ return;
|
||||
|
||||
freq->channel = pri_chan->chan;
|
||||
|
||||
@@ -2264,8 +2269,11 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
return;
|
||||
|
||||
/* Check secondary channel flags */
|
||||
- if (sec_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
|
||||
+ if (sec_chan->flag & HOSTAPD_CHAN_DISABLED)
|
||||
return;
|
||||
+ if (sec_chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
|
||||
+ if (!dfs_enabled)
|
||||
+ return;
|
||||
|
||||
if (ht40 == -1) {
|
||||
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
|
||||
@@ -2356,8 +2364,11 @@ skip_ht40:
|
||||
return;
|
||||
|
||||
/* Back to HT configuration if channel not usable */
|
||||
- if (chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
|
||||
+ if (chan->flag & HOSTAPD_CHAN_DISABLED)
|
||||
return;
|
||||
+ if (chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
|
||||
+ if (!dfs_enabled)
|
||||
+ return;
|
||||
}
|
||||
|
||||
chwidth = CHANWIDTH_80MHZ;
|
||||
@@ -2377,10 +2388,11 @@ skip_ht40:
|
||||
if (!chan)
|
||||
continue;
|
||||
|
||||
- if (chan->flag & (HOSTAPD_CHAN_DISABLED |
|
||||
- HOSTAPD_CHAN_NO_IR |
|
||||
- HOSTAPD_CHAN_RADAR))
|
||||
+ if (chan->flag & HOSTAPD_CHAN_DISABLED)
|
||||
continue;
|
||||
+ if (chan->flag & (HOSTAPD_CHAN_RADAR | HOSTAPD_CHAN_NO_IR))
|
||||
+ if (!dfs_enabled)
|
||||
+ continue;
|
||||
|
||||
/* Found a suitable second segment for 80+80 */
|
||||
chwidth = CHANWIDTH_80P80MHZ;
|
@ -1,29 +0,0 @@
|
||||
From 4f4a9b9e2e61fba334a21dadea749e4b440f42e6 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:48 -0700
|
||||
Subject: [PATCH 6/7] mesh: don't allow pri/sec channel switch
|
||||
|
||||
This limitation isn't backed by standard, but it is known that
|
||||
mesh doesn't have capability to handle 20/40 coex change in
|
||||
current implementation and it will not able to establish
|
||||
PLINK when channel switch between primary and secondary happens.
|
||||
|
||||
Since it's unknown when we will have the implementation of handling
|
||||
20/40 coex change for mesh, it'd better to avoid them from happening
|
||||
until standard based implementation is introduced.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
wpa_supplicant/mesh.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -386,6 +386,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
conf->basic_rates[rate_len] = -1;
|
||||
}
|
||||
|
||||
+ conf->no_pri_sec_switch = 1;
|
||||
/* Handle pri/sec switch frequency within AP configuration parameter
|
||||
* generation without changing the stored network profile in the end. */
|
||||
saved_freq = ssid->frequency;
|
@ -1,61 +0,0 @@
|
||||
From 71e9c65a7c8af90a5fd11072062b596421316452 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:46 -0700
|
||||
Subject: [PATCH 4/7] mesh: do not set offchanok on DFS channels in non-ETSI
|
||||
|
||||
mac80211 does not allow mgmt tx to use off channel on
|
||||
DFS channels in non-ETSI domain, because it will invalidate
|
||||
CAC result on current operating channel.
|
||||
(mac80211 commit: 34373d12f3cbb74960a73431138ef619d857996f)
|
||||
Hence don't set offchanok for mgmt tx in case of DFS channels
|
||||
in non-ETSI.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
src/drivers/driver_nl80211.c | 21 ++++++++++++++++++++-
|
||||
1 file changed, 20 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -7462,6 +7462,10 @@ static int wpa_driver_nl80211_send_actio
|
||||
int ret = -1;
|
||||
u8 *buf;
|
||||
struct ieee80211_hdr *hdr;
|
||||
+ struct hostapd_hw_modes *modes;
|
||||
+ int i, offchanok = 1;
|
||||
+ u16 num_modes, flags;
|
||||
+ u8 dfs_domain;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Send Action frame (ifindex=%d, "
|
||||
"freq=%u MHz wait=%d ms no_cck=%d)",
|
||||
@@ -7486,6 +7490,21 @@ static int wpa_driver_nl80211_send_actio
|
||||
os_memset(bss->rand_addr, 0, ETH_ALEN);
|
||||
}
|
||||
|
||||
+ if (is_mesh_interface(drv->nlmode)) {
|
||||
+ modes = nl80211_get_hw_feature_data(bss, &num_modes,
|
||||
+ &flags, &dfs_domain);
|
||||
+ if (dfs_domain != HOSTAPD_DFS_REGION_ETSI &&
|
||||
+ ieee80211_is_dfs(bss->freq, modes, num_modes))
|
||||
+ offchanok = 0;
|
||||
+ if (modes) {
|
||||
+ for (i = 0; i < num_modes; i++) {
|
||||
+ os_free(modes[i].channels);
|
||||
+ os_free(modes[i].rates);
|
||||
+ }
|
||||
+ os_free(modes);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (is_ap_interface(drv->nlmode) &&
|
||||
(!(drv->capa.flags & WPA_DRIVER_FLAGS_OFFCHANNEL_TX) ||
|
||||
(int) freq == bss->freq || drv->device_ap_sme ||
|
||||
@@ -7497,7 +7516,7 @@ static int wpa_driver_nl80211_send_actio
|
||||
ret = nl80211_send_frame_cmd(bss, freq, wait_time, buf,
|
||||
24 + data_len,
|
||||
&drv->send_action_cookie,
|
||||
- no_cck, 0, 1, NULL, 0);
|
||||
+ no_cck, 0, offchanok, NULL, 0);
|
||||
|
||||
os_free(buf);
|
||||
return ret;
|
@ -1,59 +0,0 @@
|
||||
From 5913d6e2a741683e7c747c046f72ca790bbe1337 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
Date: Mon, 27 Aug 2018 14:28:47 -0700
|
||||
Subject: [PATCH 5/7] mesh: fix channel switch error during CAC
|
||||
|
||||
Mesh interface has used its channel parameters that configured
|
||||
during its initialization even after channel switched due to
|
||||
DFS radar detection during CAC which caused channel switch error.
|
||||
This change fixes the error by updating its channel parameters
|
||||
when channel's been changed from initial one.
|
||||
|
||||
Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
|
||||
---
|
||||
wpa_supplicant/mesh.c | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "utils/uuid.h"
|
||||
#include "common/ieee802_11_defs.h"
|
||||
#include "common/wpa_ctrl.h"
|
||||
+#include "common/hw_features_common.h"
|
||||
#include "ap/sta_info.h"
|
||||
#include "ap/hostapd.h"
|
||||
#include "ap/ieee802_11.h"
|
||||
@@ -204,6 +205,32 @@ static void wpas_mesh_complete_cb(void *
|
||||
return;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * inspect if channel's been changed since initialized.
|
||||
+ * i.e. DFS radar detection
|
||||
+ */
|
||||
+ if (ifmsh->freq != params->freq.freq) {
|
||||
+ wpa_s->assoc_freq = ifmsh->freq;
|
||||
+ ssid->frequency = ifmsh->freq;
|
||||
+ if (hostapd_set_freq_params(¶ms->freq,
|
||||
+ ifmsh->conf->hw_mode,
|
||||
+ ifmsh->freq,
|
||||
+ ifmsh->conf->channel,
|
||||
+ ifmsh->conf->ieee80211n,
|
||||
+ ifmsh->conf->ieee80211ac,
|
||||
+ ifmsh->conf->ieee80211ax,
|
||||
+ ifmsh->conf->secondary_channel,
|
||||
+ hostapd_get_oper_chwidth(ifmsh->conf),
|
||||
+ hostapd_get_oper_centr_freq_seg0_idx(ifmsh->conf),
|
||||
+ hostapd_get_oper_centr_freq_seg1_idx(ifmsh->conf),
|
||||
+ ifmsh->current_mode->vht_capab,
|
||||
+ &ifmsh->current_mode->he_capab[IEEE80211_MODE_AP])) {
|
||||
+ wpa_printf(MSG_ERROR, "Error updating mesh frequency params.");
|
||||
+ wpa_supplicant_mesh_deinit(wpa_s);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (ifmsh->mconf->security != MESH_CONF_SEC_NONE &&
|
||||
wpas_mesh_init_rsn(wpa_s)) {
|
||||
wpa_printf(MSG_ERROR,
|
@ -1,219 +0,0 @@
|
||||
From 90fe6429624fc48bc0e5d2d7eeecb7498708b5e3 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Wed, 18 Apr 2018 19:24:31 +0200
|
||||
Subject: [PATCH 18/18] mesh: make forwarding configurable
|
||||
|
||||
Allow mesh_fwding to be specified in a mesh bss config, pass that
|
||||
to the driver (only nl80211 implemented for now) and announce
|
||||
forwarding capability accordingly.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
src/ap/ap_config.h | 2 ++
|
||||
src/drivers/driver.h | 2 ++
|
||||
src/drivers/driver_nl80211.c | 3 +++
|
||||
wpa_supplicant/config.c | 4 ++++
|
||||
wpa_supplicant/config.h | 9 +++++++++
|
||||
wpa_supplicant/config_file.c | 4 ++++
|
||||
wpa_supplicant/config_ssid.h | 5 +++++
|
||||
wpa_supplicant/mesh.c | 6 ++++++
|
||||
wpa_supplicant/mesh_mpm.c | 4 ++--
|
||||
wpa_supplicant/wpa_supplicant.conf | 3 +++
|
||||
10 files changed, 40 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -51,6 +51,7 @@ struct mesh_conf {
|
||||
int dot11MeshRetryTimeout; /* msec */
|
||||
int dot11MeshConfirmTimeout; /* msec */
|
||||
int dot11MeshHoldingTimeout; /* msec */
|
||||
+ int mesh_fwding;
|
||||
};
|
||||
|
||||
#define MAX_STA_COUNT 2007
|
||||
@@ -666,6 +667,7 @@ struct hostapd_bss_config {
|
||||
|
||||
#define MESH_ENABLED BIT(0)
|
||||
int mesh;
|
||||
+ int mesh_fwding;
|
||||
|
||||
u8 radio_measurements[RRM_CAPABILITIES_IE_LEN];
|
||||
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -1450,6 +1450,7 @@ struct wpa_driver_mesh_bss_params {
|
||||
#define WPA_DRIVER_MESH_CONF_FLAG_MAX_PEER_LINKS 0x00000004
|
||||
#define WPA_DRIVER_MESH_CONF_FLAG_HT_OP_MODE 0x00000008
|
||||
#define WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD 0x00000010
|
||||
+#define WPA_DRIVER_MESH_CONF_FLAG_FORWARDING 0x00000020
|
||||
/*
|
||||
* TODO: Other mesh configuration parameters would go here.
|
||||
* See NL80211_MESHCONF_* for all the mesh config parameters.
|
||||
@@ -1459,6 +1460,7 @@ struct wpa_driver_mesh_bss_params {
|
||||
int peer_link_timeout;
|
||||
int max_peer_links;
|
||||
int rssi_threshold;
|
||||
+ int forwarding;
|
||||
u16 ht_opmode;
|
||||
};
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -9592,6 +9592,9 @@ static int nl80211_put_mesh_config(struc
|
||||
if (((params->flags & WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS) &&
|
||||
nla_put_u8(msg, NL80211_MESHCONF_AUTO_OPEN_PLINKS,
|
||||
params->auto_plinks)) ||
|
||||
+ ((params->flags & WPA_DRIVER_MESH_CONF_FLAG_FORWARDING) &&
|
||||
+ nla_put_u8(msg, NL80211_MESHCONF_FORWARDING,
|
||||
+ params->forwarding)) ||
|
||||
((params->flags & WPA_DRIVER_MESH_CONF_FLAG_MAX_PEER_LINKS) &&
|
||||
nla_put_u16(msg, NL80211_MESHCONF_MAX_PEER_LINKS,
|
||||
params->max_peer_links)) ||
|
||||
--- a/wpa_supplicant/config.c
|
||||
+++ b/wpa_supplicant/config.c
|
||||
@@ -2307,6 +2307,7 @@ static const struct parse_data ssid_fiel
|
||||
#ifdef CONFIG_MESH
|
||||
{ INT_RANGE(mode, 0, 5) },
|
||||
{ INT_RANGE(no_auto_peer, 0, 1) },
|
||||
+ { INT_RANGE(mesh_fwding, 0, 1) },
|
||||
{ INT_RANGE(mesh_rssi_threshold, -255, 1) },
|
||||
#else /* CONFIG_MESH */
|
||||
{ INT_RANGE(mode, 0, 4) },
|
||||
@@ -2869,6 +2870,7 @@ void wpa_config_set_network_defaults(str
|
||||
ssid->dot11MeshRetryTimeout = DEFAULT_MESH_RETRY_TIMEOUT;
|
||||
ssid->dot11MeshConfirmTimeout = DEFAULT_MESH_CONFIRM_TIMEOUT;
|
||||
ssid->dot11MeshHoldingTimeout = DEFAULT_MESH_HOLDING_TIMEOUT;
|
||||
+ ssid->mesh_fwding = DEFAULT_MESH_FWDING;
|
||||
ssid->mesh_rssi_threshold = DEFAULT_MESH_RSSI_THRESHOLD;
|
||||
#endif /* CONFIG_MESH */
|
||||
#ifdef CONFIG_HT_OVERRIDES
|
||||
@@ -4089,6 +4091,7 @@ struct wpa_config * wpa_config_alloc_emp
|
||||
config->user_mpm = DEFAULT_USER_MPM;
|
||||
config->max_peer_links = DEFAULT_MAX_PEER_LINKS;
|
||||
config->mesh_max_inactivity = DEFAULT_MESH_MAX_INACTIVITY;
|
||||
+ config->mesh_fwding = DEFAULT_MESH_FWDING;
|
||||
config->dot11RSNASAERetransPeriod =
|
||||
DEFAULT_DOT11_RSNA_SAE_RETRANS_PERIOD;
|
||||
config->fast_reauth = DEFAULT_FAST_REAUTH;
|
||||
@@ -4726,6 +4729,7 @@ static const struct global_parse_data gl
|
||||
{ INT(user_mpm), 0 },
|
||||
{ INT_RANGE(max_peer_links, 0, 255), 0 },
|
||||
{ INT(mesh_max_inactivity), 0 },
|
||||
+ { INT_RANGE(mesh_fwding, 0, 1), 0 },
|
||||
{ INT(dot11RSNASAERetransPeriod), 0 },
|
||||
#endif /* CONFIG_MESH */
|
||||
{ INT(disable_scan_offload), 0 },
|
||||
--- a/wpa_supplicant/config.h
|
||||
+++ b/wpa_supplicant/config.h
|
||||
@@ -18,6 +18,7 @@
|
||||
#define DEFAULT_USER_MPM 1
|
||||
#define DEFAULT_MAX_PEER_LINKS 99
|
||||
#define DEFAULT_MESH_MAX_INACTIVITY 300
|
||||
+#define DEFAULT_MESH_FWDING 1
|
||||
/*
|
||||
* The default dot11RSNASAERetransPeriod is defined as 40 ms in the standard,
|
||||
* but use 1000 ms in practice to avoid issues on low power CPUs.
|
||||
@@ -1327,6 +1328,14 @@ struct wpa_config {
|
||||
int mesh_max_inactivity;
|
||||
|
||||
/**
|
||||
+ * mesh_fwding - Mesh network layer-2 forwarding
|
||||
+ *
|
||||
+ * This controls whether to enable layer-2 forwarding.
|
||||
+ * By default: 1: enabled
|
||||
+ */
|
||||
+ int mesh_fwding;
|
||||
+
|
||||
+ /**
|
||||
* dot11RSNASAERetransPeriod - Timeout to retransmit SAE Auth frame
|
||||
*
|
||||
* This timeout value is used in mesh STA to retransmit
|
||||
--- a/wpa_supplicant/config_file.c
|
||||
+++ b/wpa_supplicant/config_file.c
|
||||
@@ -829,6 +829,7 @@ static void wpa_config_write_network(FIL
|
||||
#endif /* IEEE8021X_EAPOL */
|
||||
INT(mode);
|
||||
INT(no_auto_peer);
|
||||
+ INT(mesh_fwding);
|
||||
INT(frequency);
|
||||
INT(fixed_freq);
|
||||
#ifdef CONFIG_ACS
|
||||
@@ -1472,6 +1473,9 @@ static void wpa_config_write_global(FILE
|
||||
fprintf(f, "mesh_max_inactivity=%d\n",
|
||||
config->mesh_max_inactivity);
|
||||
|
||||
+ if (config->mesh_fwding != DEFAULT_MESH_FWDING)
|
||||
+ fprintf(f, "mesh_fwding=%d\n", config->mesh_fwding);
|
||||
+
|
||||
if (config->dot11RSNASAERetransPeriod !=
|
||||
DEFAULT_DOT11_RSNA_SAE_RETRANS_PERIOD)
|
||||
fprintf(f, "dot11RSNASAERetransPeriod=%d\n",
|
||||
--- a/wpa_supplicant/config_ssid.h
|
||||
+++ b/wpa_supplicant/config_ssid.h
|
||||
@@ -516,6 +516,11 @@ struct wpa_ssid {
|
||||
int dot11MeshConfirmTimeout; /* msec */
|
||||
int dot11MeshHoldingTimeout; /* msec */
|
||||
|
||||
+ /**
|
||||
+ * Mesh network layer-2 forwarding
|
||||
+ */
|
||||
+ int mesh_fwding;
|
||||
+
|
||||
int ht;
|
||||
int ht40;
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -126,6 +126,7 @@ static struct mesh_conf * mesh_config_cr
|
||||
conf->mesh_cc_id = 0;
|
||||
conf->mesh_sp_id = MESH_SYNC_METHOD_NEIGHBOR_OFFSET;
|
||||
conf->mesh_auth_id = (conf->security & MESH_CONF_SEC_AUTH) ? 1 : 0;
|
||||
+ conf->mesh_fwding = ssid->mesh_fwding;
|
||||
conf->dot11MeshMaxRetries = ssid->dot11MeshMaxRetries;
|
||||
conf->dot11MeshRetryTimeout = ssid->dot11MeshRetryTimeout;
|
||||
conf->dot11MeshConfirmTimeout = ssid->dot11MeshConfirmTimeout;
|
||||
@@ -328,6 +329,7 @@ static int wpa_supplicant_mesh_init(stru
|
||||
bss->conf->start_disabled = 1;
|
||||
bss->conf->mesh = MESH_ENABLED;
|
||||
bss->conf->ap_max_inactivity = wpa_s->conf->mesh_max_inactivity;
|
||||
+ bss->conf->mesh_fwding = wpa_s->conf->mesh_fwding;
|
||||
|
||||
if (ieee80211_is_dfs(ssid->frequency, wpa_s->hw.modes,
|
||||
wpa_s->hw.num_modes) && wpa_s->conf->country[0]) {
|
||||
@@ -549,6 +551,10 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
}
|
||||
params->conf.peer_link_timeout = wpa_s->conf->mesh_max_inactivity;
|
||||
|
||||
+ /* always explicitely set forwarding to on or off for now */
|
||||
+ params->conf.flags |= WPA_DRIVER_MESH_CONF_FLAG_FORWARDING;
|
||||
+ params->conf.forwarding = ssid->mesh_fwding;
|
||||
+
|
||||
os_free(wpa_s->mesh_params);
|
||||
wpa_s->mesh_params = params;
|
||||
if (wpa_supplicant_mesh_init(wpa_s, ssid, ¶ms->freq)) {
|
||||
--- a/wpa_supplicant/mesh_mpm.c
|
||||
+++ b/wpa_supplicant/mesh_mpm.c
|
||||
@@ -305,9 +305,9 @@ static void mesh_mpm_send_plink_action(s
|
||||
info = (bss->num_plinks > 63 ? 63 : bss->num_plinks) << 1;
|
||||
/* TODO: Add Connected to Mesh Gate/AS subfields */
|
||||
wpabuf_put_u8(buf, info);
|
||||
- /* always forwarding & accepting plinks for now */
|
||||
+ /* set forwarding & always accepting plinks for now */
|
||||
wpabuf_put_u8(buf, MESH_CAP_ACCEPT_ADDITIONAL_PEER |
|
||||
- MESH_CAP_FORWARDING);
|
||||
+ (conf->mesh_fwding ? MESH_CAP_FORWARDING : 0));
|
||||
} else { /* Peer closing frame */
|
||||
/* IE: Mesh ID */
|
||||
wpabuf_put_u8(buf, WLAN_EID_MESH_ID);
|
||||
--- a/wpa_supplicant/wpa_supplicant.conf
|
||||
+++ b/wpa_supplicant/wpa_supplicant.conf
|
||||
@@ -153,6 +153,9 @@ ap_scan=1
|
||||
# This timeout value is used in mesh STA to clean up inactive stations.
|
||||
#mesh_max_inactivity=300
|
||||
|
||||
+# Enable 802.11s layer-2 routing and forwarding
|
||||
+#mesh_fwding=1
|
||||
+
|
||||
# cert_in_cb - Whether to include a peer certificate dump in events
|
||||
# This controls whether peer certificates for authentication server and
|
||||
# its certificate chain are included in EAP peer certificate events. This is
|
@ -1,34 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Tue, 12 Feb 2019 14:22:43 +0100
|
||||
Subject: [PATCH v2] wpa_supplicant: fix race condition in mesh mpm new peer
|
||||
handling
|
||||
|
||||
When wpa_supplicant receives another new peer event before the first one
|
||||
has been processed, it tries to add a station to the driver a second time
|
||||
(which fails) and then tears down the station entry until another event
|
||||
comes in.
|
||||
Fix this by only adding a station to the driver if it didn't exist already.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/wpa_supplicant/mesh_mpm.c
|
||||
+++ b/wpa_supplicant/mesh_mpm.c
|
||||
@@ -710,11 +710,12 @@ static struct sta_info * mesh_mpm_add_pe
|
||||
}
|
||||
|
||||
sta = ap_get_sta(data, addr);
|
||||
- if (!sta) {
|
||||
- sta = ap_sta_add(data, addr);
|
||||
- if (!sta)
|
||||
- return NULL;
|
||||
- }
|
||||
+ if (sta)
|
||||
+ return NULL;
|
||||
+
|
||||
+ sta = ap_sta_add(data, addr);
|
||||
+ if (!sta)
|
||||
+ return NULL;
|
||||
|
||||
/* Set WMM by default since Mesh STAs are QoS STAs */
|
||||
sta->flags |= WLAN_STA_WMM;
|
@ -1,66 +0,0 @@
|
||||
From 8c07fa9eda13e835f3f968b2e1c9a8be3a851ff9 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Thu, 29 Aug 2019 11:52:04 +0300
|
||||
Subject: [PATCH] AP: Silently ignore management frame from unexpected source
|
||||
address
|
||||
|
||||
Do not process any received Management frames with unexpected/invalid SA
|
||||
so that we do not add any state for unexpected STA addresses or end up
|
||||
sending out frames to unexpected destination. This prevents unexpected
|
||||
sequences where an unprotected frame might end up causing the AP to send
|
||||
out a response to another device and that other device processing the
|
||||
unexpected response.
|
||||
|
||||
In particular, this prevents some potential denial of service cases
|
||||
where the unexpected response frame from the AP might result in a
|
||||
connected station dropping its association.
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
---
|
||||
src/ap/drv_callbacks.c | 13 +++++++++++++
|
||||
src/ap/ieee802_11.c | 12 ++++++++++++
|
||||
2 files changed, 25 insertions(+)
|
||||
|
||||
--- a/src/ap/drv_callbacks.c
|
||||
+++ b/src/ap/drv_callbacks.c
|
||||
@@ -131,6 +131,19 @@ int hostapd_notif_assoc(struct hostapd_d
|
||||
"hostapd_notif_assoc: Skip event with no address");
|
||||
return -1;
|
||||
}
|
||||
+
|
||||
+ if (is_multicast_ether_addr(addr) ||
|
||||
+ is_zero_ether_addr(addr) ||
|
||||
+ os_memcmp(addr, hapd->own_addr, ETH_ALEN) == 0) {
|
||||
+ /* Do not process any frames with unexpected/invalid SA so that
|
||||
+ * we do not add any state for unexpected STA addresses or end
|
||||
+ * up sending out frames to unexpected destination. */
|
||||
+ wpa_printf(MSG_DEBUG, "%s: Invalid SA=" MACSTR
|
||||
+ " in received indication - ignore this indication silently",
|
||||
+ __func__, MAC2STR(addr));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
random_add_randomness(addr, ETH_ALEN);
|
||||
|
||||
hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211,
|
||||
--- a/src/ap/ieee802_11.c
|
||||
+++ b/src/ap/ieee802_11.c
|
||||
@@ -4626,6 +4626,18 @@ int ieee802_11_mgmt(struct hostapd_data
|
||||
fc = le_to_host16(mgmt->frame_control);
|
||||
stype = WLAN_FC_GET_STYPE(fc);
|
||||
|
||||
+ if (is_multicast_ether_addr(mgmt->sa) ||
|
||||
+ is_zero_ether_addr(mgmt->sa) ||
|
||||
+ os_memcmp(mgmt->sa, hapd->own_addr, ETH_ALEN) == 0) {
|
||||
+ /* Do not process any frames with unexpected/invalid SA so that
|
||||
+ * we do not add any state for unexpected STA addresses or end
|
||||
+ * up sending out frames to unexpected destination. */
|
||||
+ wpa_printf(MSG_DEBUG, "MGMT: Invalid SA=" MACSTR
|
||||
+ " in received frame - ignore this frame silently",
|
||||
+ MAC2STR(mgmt->sa));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (stype == WLAN_FC_STYPE_BEACON) {
|
||||
handle_beacon(hapd, mgmt, len, fi);
|
||||
return 1;
|
@ -1,41 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 23 Jan 2020 13:50:47 +0100
|
||||
Subject: [PATCH] driver_nl80211: fix WMM queue mapping for regulatory
|
||||
limit
|
||||
|
||||
nl80211 uses a different queue mapping from hostap, so AC indexes need to
|
||||
be converted.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/src/drivers/driver_nl80211_capa.c
|
||||
+++ b/src/drivers/driver_nl80211_capa.c
|
||||
@@ -1403,6 +1403,12 @@ static void phy_info_freq(struct hostapd
|
||||
[NL80211_WMMR_AIFSN] = { .type = NLA_U8 },
|
||||
[NL80211_WMMR_TXOP] = { .type = NLA_U16 },
|
||||
};
|
||||
+ static const u8 wmm_map[4] = {
|
||||
+ [NL80211_AC_BE] = WMM_AC_BE,
|
||||
+ [NL80211_AC_BK] = WMM_AC_BK,
|
||||
+ [NL80211_AC_VI] = WMM_AC_VI,
|
||||
+ [NL80211_AC_VO] = WMM_AC_VO,
|
||||
+ };
|
||||
struct nlattr *nl_wmm;
|
||||
struct nlattr *tb_wmm[NL80211_WMMR_MAX + 1];
|
||||
int rem_wmm, ac, count = 0;
|
||||
@@ -1424,12 +1430,13 @@ static void phy_info_freq(struct hostapd
|
||||
return;
|
||||
}
|
||||
ac = nl_wmm->nla_type;
|
||||
- if (ac < 0 || ac >= WMM_AC_NUM) {
|
||||
+ if (ac >= ARRAY_SIZE(wmm_map)) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"nl80211: Invalid AC value %d", ac);
|
||||
return;
|
||||
}
|
||||
|
||||
+ ac = wmm_map[ac];
|
||||
chan->wmm_rules[ac].min_cwmin =
|
||||
nla_get_u16(tb_wmm[NL80211_WMMR_CW_MIN]);
|
||||
chan->wmm_rules[ac].min_cwmax =
|
@ -1,47 +0,0 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 23 Jan 2020 14:10:20 +0100
|
||||
Subject: [PATCH] driver_nl80211: fix regulatory limits for wmm cwmin/cwmax
|
||||
values
|
||||
|
||||
The internal WMM AC parameters use just the exponent of the CW value, while
|
||||
nl80211 reports the full CW value.
|
||||
This led to completely bogus CWmin/CWmax values in the WMM IE when a regulatory
|
||||
limit was present. Fix this by converting the value to the exponent before
|
||||
passing it on
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/src/drivers/driver_nl80211_capa.c
|
||||
+++ b/src/drivers/driver_nl80211_capa.c
|
||||
@@ -1336,6 +1336,18 @@ static void phy_info_vht_capa(struct hos
|
||||
}
|
||||
}
|
||||
|
||||
+static inline int cw2ecw(unsigned int cw)
|
||||
+{
|
||||
+ int bit;
|
||||
+
|
||||
+ if (cw == 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (bit = 1; cw != 1; bit++)
|
||||
+ cw >>= 1;
|
||||
+
|
||||
+ return bit;
|
||||
+}
|
||||
|
||||
static void phy_info_freq(struct hostapd_hw_modes *mode,
|
||||
struct hostapd_channel_data *chan,
|
||||
@@ -1438,9 +1450,9 @@ static void phy_info_freq(struct hostapd
|
||||
|
||||
ac = wmm_map[ac];
|
||||
chan->wmm_rules[ac].min_cwmin =
|
||||
- nla_get_u16(tb_wmm[NL80211_WMMR_CW_MIN]);
|
||||
+ cw2ecw(nla_get_u16(tb_wmm[NL80211_WMMR_CW_MIN]));
|
||||
chan->wmm_rules[ac].min_cwmax =
|
||||
- nla_get_u16(tb_wmm[NL80211_WMMR_CW_MAX]);
|
||||
+ cw2ecw(nla_get_u16(tb_wmm[NL80211_WMMR_CW_MAX]));
|
||||
chan->wmm_rules[ac].min_aifs =
|
||||
nla_get_u8(tb_wmm[NL80211_WMMR_AIFSN]);
|
||||
chan->wmm_rules[ac].max_txop =
|
@ -1,26 +0,0 @@
|
||||
From 1766e608ba1114220f3b3598e77aa53b50c38a6e Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <jouni@codeaurora.org>
|
||||
Date: Mon, 14 Oct 2019 19:27:47 +0300
|
||||
Subject: [PATCH] wolfSSL: Fix crypto_bignum_sub()
|
||||
|
||||
The initial crypto wrapper implementation for wolfSSL seems to have
|
||||
included a copy-paste error in crypto_bignum_sub() implementation that
|
||||
was identical to crypto_bignum_add() while mp_sub() should have been
|
||||
used instead of mp_add().
|
||||
|
||||
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
|
||||
---
|
||||
src/crypto/crypto_wolfssl.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/src/crypto/crypto_wolfssl.c
|
||||
+++ b/src/crypto/crypto_wolfssl.c
|
||||
@@ -1151,7 +1151,7 @@ int crypto_bignum_sub(const struct crypt
|
||||
if (TEST_FAIL())
|
||||
return -1;
|
||||
|
||||
- return mp_add((mp_int *) a, (mp_int *) b,
|
||||
+ return mp_sub((mp_int *) a, (mp_int *) b,
|
||||
(mp_int *) r) == MP_OKAY ? 0 : -1;
|
||||
}
|
||||
|
@ -1,31 +0,0 @@
|
||||
From 6a28c4dbc102de3fed9db44637f47a10e7adfb78 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Sat, 16 May 2020 21:01:51 +0300
|
||||
Subject: [PATCH 1/3] wolfssl: Fix compiler warnings on size_t printf format
|
||||
use
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
---
|
||||
src/crypto/tls_wolfssl.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/crypto/tls_wolfssl.c
|
||||
+++ b/src/crypto/tls_wolfssl.c
|
||||
@@ -1741,7 +1741,7 @@ struct wpabuf * tls_connection_encrypt(v
|
||||
if (!conn)
|
||||
return NULL;
|
||||
|
||||
- wpa_printf(MSG_DEBUG, "SSL: encrypt: %ld bytes", wpabuf_len(in_data));
|
||||
+ wpa_printf(MSG_DEBUG, "SSL: encrypt: %zu bytes", wpabuf_len(in_data));
|
||||
|
||||
wolfssl_reset_out_data(&conn->output);
|
||||
|
||||
@@ -1792,7 +1792,7 @@ struct wpabuf * tls_connection_decrypt(v
|
||||
}
|
||||
wpabuf_put(buf, res);
|
||||
|
||||
- wpa_printf(MSG_DEBUG, "SSL: decrypt: %ld bytes", wpabuf_len(buf));
|
||||
+ wpa_printf(MSG_DEBUG, "SSL: decrypt: %zu bytes", wpabuf_len(buf));
|
||||
|
||||
return buf;
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
From eb595b3e3ab531645a5bde71cf6385335b7a4b95 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Sat, 16 May 2020 21:02:17 +0300
|
||||
Subject: [PATCH 2/3] wolfssl: Fix crypto_bignum_rand() implementation
|
||||
|
||||
The previous implementation used mp_rand_prime() to generate a random
|
||||
value in range 0..m. That is insanely slow way of generating a random
|
||||
value since mp_rand_prime() is for generating a random _prime_ which is
|
||||
not what is needed here. Replace that implementation with generationg of
|
||||
a random value in the requested range without doing any kind of prime
|
||||
number checks or loops to reject values that are not primes.
|
||||
|
||||
This speeds up SAE and EAP-pwd routines by couple of orders of
|
||||
magnitude..
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
---
|
||||
src/crypto/crypto_wolfssl.c | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/src/crypto/crypto_wolfssl.c
|
||||
+++ b/src/crypto/crypto_wolfssl.c
|
||||
@@ -1084,19 +1084,21 @@ int crypto_bignum_rand(struct crypto_big
|
||||
{
|
||||
int ret = 0;
|
||||
WC_RNG rng;
|
||||
+ size_t len;
|
||||
+ u8 *buf;
|
||||
|
||||
if (TEST_FAIL())
|
||||
return -1;
|
||||
if (wc_InitRng(&rng) != 0)
|
||||
return -1;
|
||||
- if (mp_rand_prime((mp_int *) r,
|
||||
- (mp_count_bits((mp_int *) m) + 7) / 8 * 2,
|
||||
- &rng, NULL) != 0)
|
||||
- ret = -1;
|
||||
- if (ret == 0 &&
|
||||
+ len = (mp_count_bits((mp_int *) m) + 7) / 8;
|
||||
+ buf = os_malloc(len);
|
||||
+ if (!buf || wc_RNG_GenerateBlock(&rng, buf, len) != 0 ||
|
||||
+ mp_read_unsigned_bin((mp_int *) r, buf, len) != MP_OKAY ||
|
||||
mp_mod((mp_int *) r, (mp_int *) m, (mp_int *) r) != 0)
|
||||
ret = -1;
|
||||
wc_FreeRng(&rng);
|
||||
+ bin_clear_free(buf, len);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 79488da576aeeb9400e1742fab7f463eed0fa7a1 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Sat, 16 May 2020 21:07:45 +0300
|
||||
Subject: [PATCH 3/3] wolfssl: Do not hardcode include directory in
|
||||
wpa_supplicant build
|
||||
|
||||
This is not really appropriate for any kind of cross compilations and is
|
||||
not really needed in general since system specific values can be set in
|
||||
.config.
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
---
|
||||
wpa_supplicant/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -1086,7 +1086,7 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_TLS), wolfssl)
|
||||
ifdef TLS_FUNCS
|
||||
-CFLAGS += -DWOLFSSL_DER_LOAD -I/usr/local/include/wolfssl
|
||||
+CFLAGS += -DWOLFSSL_DER_LOAD
|
||||
OBJS += ../src/crypto/tls_wolfssl.o
|
||||
endif
|
||||
OBJS += ../src/crypto/crypto_wolfssl.o
|
@ -8,7 +8,7 @@
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <sys/capability.h>
|
||||
@@ -182,59 +183,46 @@ int os_gmtime(os_time_t t, struct os_tm
|
||||
@@ -188,59 +189,46 @@ int os_gmtime(os_time_t t, struct os_tm
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
ifndef CONFIG_NO_GITVER
|
||||
# Add VERSION_STR postfix for builds from a git repository
|
||||
@@ -198,7 +199,8 @@ endif
|
||||
@@ -200,7 +201,8 @@ endif
|
||||
|
||||
ifdef CONFIG_NO_VLAN
|
||||
CFLAGS += -DCONFIG_NO_VLAN
|
||||
@ -18,7 +18,7 @@
|
||||
OBJS += ../src/ap/vlan_init.o
|
||||
OBJS += ../src/ap/vlan_ifconfig.o
|
||||
OBJS += ../src/ap/vlan.o
|
||||
@@ -366,10 +368,14 @@ CFLAGS += -DCONFIG_MBO
|
||||
@@ -346,10 +348,14 @@ CFLAGS += -DCONFIG_MBO
|
||||
OBJS += ../src/ap/mbo_ap.o
|
||||
endif
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
LIBS += $(DRV_AP_LIBS)
|
||||
|
||||
ifdef CONFIG_L2_PACKET
|
||||
@@ -1316,6 +1322,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
|
||||
@@ -1294,6 +1300,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
|
||||
|
||||
BCHECK=../src/drivers/build.hostapd
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
hostapd: $(BCHECK) $(OBJS)
|
||||
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
|
||||
@$(E) " LD " $@
|
||||
@@ -1358,6 +1370,12 @@ ifeq ($(CONFIG_TLS), linux)
|
||||
@@ -1335,6 +1347,12 @@ ifeq ($(CONFIG_TLS), linux)
|
||||
HOBJS += ../src/crypto/crypto_linux.o
|
||||
endif
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
|
||||
ifndef CONFIG_NO_GITVER
|
||||
# Add VERSION_STR postfix for builds from a git repository
|
||||
@@ -363,7 +364,9 @@ endif
|
||||
@@ -359,7 +360,9 @@ endif
|
||||
ifdef CONFIG_IBSS_RSN
|
||||
NEED_RSN_AUTHENTICATOR=y
|
||||
CFLAGS += -DCONFIG_IBSS_RSN
|
||||
@ -82,7 +82,7 @@
|
||||
OBJS += ibss_rsn.o
|
||||
endif
|
||||
|
||||
@@ -892,6 +895,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
|
||||
@@ -880,6 +883,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
|
||||
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
|
||||
LIBS += -ldl -rdynamic
|
||||
endif
|
||||
@ -93,7 +93,7 @@
|
||||
endif
|
||||
|
||||
ifdef CONFIG_AP
|
||||
@@ -899,9 +906,11 @@ NEED_EAP_COMMON=y
|
||||
@@ -887,9 +894,11 @@ NEED_EAP_COMMON=y
|
||||
NEED_RSN_AUTHENTICATOR=y
|
||||
CFLAGS += -DCONFIG_AP
|
||||
OBJS += ap.o
|
||||
@ -105,7 +105,7 @@
|
||||
OBJS += ../src/ap/hostapd.o
|
||||
OBJS += ../src/ap/wpa_auth_glue.o
|
||||
OBJS += ../src/ap/utils.o
|
||||
@@ -983,6 +992,12 @@ endif
|
||||
@@ -969,6 +978,12 @@ endif
|
||||
ifdef CONFIG_HS20
|
||||
OBJS += ../src/ap/hs20.o
|
||||
endif
|
||||
@ -118,7 +118,7 @@
|
||||
endif
|
||||
|
||||
ifdef CONFIG_MBO
|
||||
@@ -991,7 +1006,9 @@ CFLAGS += -DCONFIG_MBO
|
||||
@@ -977,7 +992,9 @@ CFLAGS += -DCONFIG_MBO
|
||||
endif
|
||||
|
||||
ifdef NEED_RSN_AUTHENTICATOR
|
||||
@ -128,7 +128,7 @@
|
||||
NEED_AES_WRAP=y
|
||||
OBJS += ../src/ap/wpa_auth.o
|
||||
OBJS += ../src/ap/wpa_auth_ie.o
|
||||
@@ -1899,6 +1916,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
|
||||
@@ -1887,6 +1904,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
|
||||
|
||||
$(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config
|
||||
|
||||
@ -141,7 +141,7 @@
|
||||
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
||||
@$(E) " LD " $@
|
||||
@@ -1999,6 +2022,12 @@ endif
|
||||
@@ -1987,6 +2010,12 @@ endif
|
||||
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
|
||||
@$(E) " sed" $<
|
||||
|
||||
@ -156,7 +156,7 @@
|
||||
wpa_cli.exe: wpa_cli
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -5657,8 +5657,8 @@ union wpa_event_data {
|
||||
@@ -5865,8 +5865,8 @@ union wpa_event_data {
|
||||
* Driver wrapper code should call this function whenever an event is received
|
||||
* from the driver.
|
||||
*/
|
||||
@ -167,7 +167,7 @@
|
||||
|
||||
/**
|
||||
* wpa_supplicant_event_global - Report a driver event for wpa_supplicant
|
||||
@@ -5670,7 +5670,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
@@ -5878,7 +5878,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
* Same as wpa_supplicant_event(), but we search for the interface in
|
||||
* wpa_global.
|
||||
*/
|
||||
@ -178,7 +178,7 @@
|
||||
/*
|
||||
--- a/src/ap/drv_callbacks.c
|
||||
+++ b/src/ap/drv_callbacks.c
|
||||
@@ -1669,8 +1669,8 @@ err:
|
||||
@@ -1768,8 +1768,8 @@ err:
|
||||
#endif /* CONFIG_OWE */
|
||||
|
||||
|
||||
@ -189,7 +189,7 @@
|
||||
{
|
||||
struct hostapd_data *hapd = ctx;
|
||||
#ifndef CONFIG_NO_STDOUT_DEBUG
|
||||
@@ -1915,7 +1915,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
@@ -2014,7 +2014,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
}
|
||||
|
||||
|
||||
@ -200,7 +200,7 @@
|
||||
struct hapd_interfaces *interfaces = ctx;
|
||||
--- a/wpa_supplicant/wpa_priv.c
|
||||
+++ b/wpa_supplicant/wpa_priv.c
|
||||
@@ -1031,8 +1031,8 @@ static void wpa_priv_send_ft_response(st
|
||||
@@ -1038,8 +1038,8 @@ static void wpa_priv_send_ft_response(st
|
||||
}
|
||||
|
||||
|
||||
@ -211,7 +211,7 @@
|
||||
{
|
||||
struct wpa_priv_interface *iface = ctx;
|
||||
|
||||
@@ -1095,7 +1095,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
@@ -1102,7 +1102,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
}
|
||||
|
||||
|
||||
@ -220,7 +220,7 @@
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
struct wpa_priv_global *global = ctx;
|
||||
@@ -1207,6 +1207,8 @@ int main(int argc, char *argv[])
|
||||
@@ -1215,6 +1215,8 @@ int main(int argc, char *argv[])
|
||||
if (os_program_init())
|
||||
return -1;
|
||||
|
||||
@ -231,7 +231,7 @@
|
||||
os_memset(&global, 0, sizeof(global));
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -4184,8 +4184,8 @@ static void wpas_event_assoc_reject(stru
|
||||
@@ -4499,8 +4499,8 @@ static void wpas_event_unprot_beacon(str
|
||||
}
|
||||
|
||||
|
||||
@ -242,7 +242,7 @@
|
||||
{
|
||||
struct wpa_supplicant *wpa_s = ctx;
|
||||
int resched;
|
||||
@@ -4967,7 +4967,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
@@ -5313,7 +5313,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
}
|
||||
|
||||
|
||||
@ -253,7 +253,7 @@
|
||||
struct wpa_supplicant *wpa_s;
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -6096,7 +6096,6 @@ struct wpa_interface * wpa_supplicant_ma
|
||||
@@ -6571,7 +6571,6 @@ struct wpa_interface * wpa_supplicant_ma
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -261,7 +261,7 @@
|
||||
/**
|
||||
* wpa_supplicant_match_existing - Match existing interfaces
|
||||
* @global: Pointer to global data from wpa_supplicant_init()
|
||||
@@ -6133,6 +6132,11 @@ static int wpa_supplicant_match_existing
|
||||
@@ -6608,6 +6607,11 @@ static int wpa_supplicant_match_existing
|
||||
|
||||
#endif /* CONFIG_MATCH_IFACE */
|
||||
|
||||
@ -273,7 +273,7 @@
|
||||
|
||||
/**
|
||||
* wpa_supplicant_add_iface - Add a new network interface
|
||||
@@ -6389,6 +6393,8 @@ struct wpa_global * wpa_supplicant_init(
|
||||
@@ -6864,6 +6868,8 @@ struct wpa_global * wpa_supplicant_init(
|
||||
#ifndef CONFIG_NO_WPA_MSG
|
||||
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
|
||||
#endif /* CONFIG_NO_WPA_MSG */
|
||||
@ -284,7 +284,7 @@
|
||||
wpa_debug_open_file(params->wpa_debug_file_path);
|
||||
--- a/hostapd/main.c
|
||||
+++ b/hostapd/main.c
|
||||
@@ -592,6 +592,11 @@ fail:
|
||||
@@ -590,6 +590,11 @@ fail:
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@
|
||||
|
||||
#ifdef CONFIG_WPS
|
||||
static int gen_uuid(const char *txt_addr)
|
||||
@@ -682,6 +687,8 @@ int main(int argc, char *argv[])
|
||||
@@ -680,6 +685,8 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
#endif /* CONFIG_DPP */
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -3411,6 +3411,10 @@ static int hostapd_config_fill(struct ho
|
||||
@@ -3452,6 +3452,10 @@ static int hostapd_config_fill(struct ho
|
||||
if (bss->ocv && !bss->ieee80211w)
|
||||
bss->ieee80211w = 1;
|
||||
#endif /* CONFIG_OCV */
|
||||
#ifdef CONFIG_IEEE80211N
|
||||
+ } else if (os_strcmp(buf, "noscan") == 0) {
|
||||
+ conf->noscan = atoi(pos);
|
||||
+ } else if (os_strcmp(buf, "ht_coex") == 0) {
|
||||
@ -13,7 +13,7 @@
|
||||
} else if (os_strcmp(buf, "ht_capab") == 0) {
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -934,6 +934,8 @@ struct hostapd_config {
|
||||
@@ -972,6 +972,8 @@ struct hostapd_config {
|
||||
|
||||
int ht_op_mode_fixed;
|
||||
u16 ht_capab;
|
||||
@ -24,7 +24,7 @@
|
||||
int no_pri_sec_switch;
|
||||
--- a/src/ap/hw_features.c
|
||||
+++ b/src/ap/hw_features.c
|
||||
@@ -477,7 +477,8 @@ static int ieee80211n_check_40mhz(struct
|
||||
@@ -500,7 +500,8 @@ static int ieee80211n_check_40mhz(struct
|
||||
int ret;
|
||||
|
||||
/* Check that HT40 is used and PRI / SEC switch is allowed */
|
||||
@ -36,7 +36,7 @@
|
||||
hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
|
||||
--- a/src/ap/ieee802_11_ht.c
|
||||
+++ b/src/ap/ieee802_11_ht.c
|
||||
@@ -252,6 +252,9 @@ void hostapd_2040_coex_action(struct hos
|
||||
@@ -230,6 +230,9 @@ void hostapd_2040_coex_action(struct hos
|
||||
return;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
if (len < IEEE80211_HDRLEN + 2 + sizeof(*bc_ie)) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Ignore too short 20/40 BSS Coexistence Management frame");
|
||||
@@ -412,6 +415,9 @@ void ht40_intolerant_add(struct hostapd_
|
||||
@@ -390,6 +393,9 @@ void ht40_intolerant_add(struct hostapd_
|
||||
if (iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
|
||||
return;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/config.c
|
||||
+++ b/wpa_supplicant/config.c
|
||||
@@ -2312,6 +2312,7 @@ static const struct parse_data ssid_fiel
|
||||
@@ -2477,6 +2477,7 @@ static const struct parse_data ssid_fiel
|
||||
#else /* CONFIG_MESH */
|
||||
{ INT_RANGE(mode, 0, 4) },
|
||||
#endif /* CONFIG_MESH */
|
||||
@ -10,17 +10,17 @@
|
||||
{ STR(id_str) },
|
||||
--- a/wpa_supplicant/config_file.c
|
||||
+++ b/wpa_supplicant/config_file.c
|
||||
@@ -829,6 +829,7 @@ static void wpa_config_write_network(FIL
|
||||
@@ -866,6 +866,7 @@ static void wpa_config_write_network(FIL
|
||||
#endif /* IEEE8021X_EAPOL */
|
||||
INT(mode);
|
||||
INT(no_auto_peer);
|
||||
+ INT(noscan);
|
||||
INT(mesh_fwding);
|
||||
INT(frequency);
|
||||
INT(fixed_freq);
|
||||
INT(enable_edmg);
|
||||
INT(edmg_channel);
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -361,6 +361,8 @@ static int wpa_supplicant_mesh_init(stru
|
||||
@@ -333,6 +333,8 @@ static int wpa_supplicant_mesh_init(stru
|
||||
frequency);
|
||||
goto out_free;
|
||||
}
|
||||
@ -31,7 +31,7 @@
|
||||
if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && ssid->vht) {
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -2143,12 +2143,12 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
@@ -2331,12 +2331,12 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
|
||||
enum hostapd_hw_mode hw_mode;
|
||||
struct hostapd_hw_modes *mode = NULL;
|
||||
@ -46,8 +46,8 @@
|
||||
unsigned int j, k;
|
||||
struct hostapd_freq_params vht_freq;
|
||||
int chwidth, seg0, seg1;
|
||||
@@ -2221,7 +2221,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
return;
|
||||
@@ -2416,7 +2416,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
#endif /* CONFIG_HE_OVERRIDES */
|
||||
|
||||
/* Setup higher BW only for 5 GHz */
|
||||
- if (mode->mode != HOSTAPD_MODE_IEEE80211A)
|
||||
@ -57,7 +57,7 @@
|
||||
for (chan_idx = 0; chan_idx < mode->num_channels; chan_idx++) {
|
||||
--- a/wpa_supplicant/config_ssid.h
|
||||
+++ b/wpa_supplicant/config_ssid.h
|
||||
@@ -918,6 +918,8 @@ struct wpa_ssid {
|
||||
@@ -960,6 +960,8 @@ struct wpa_ssid {
|
||||
*/
|
||||
int no_auto_peer;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -4474,7 +4474,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
||||
@@ -4926,7 +4926,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
||||
if (wpa_s == NULL)
|
||||
return NULL;
|
||||
wpa_s->scan_req = INITIAL_SCAN_REQ;
|
||||
|
@ -24,7 +24,7 @@
|
||||
endif
|
||||
|
||||
ifdef NEED_NETLINK
|
||||
@@ -146,6 +143,7 @@ endif
|
||||
@@ -142,6 +139,7 @@ endif
|
||||
|
||||
ifdef NEED_RFKILL
|
||||
DRV_OBJS += ../src/drivers/rfkill.o
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -4431,7 +4431,7 @@ static int nl80211_set_channel(struct i8
|
||||
@@ -4639,7 +4639,7 @@ static int nl80211_set_channel(struct i8
|
||||
freq->freq, freq->ht_enabled, freq->vht_enabled, freq->he_enabled,
|
||||
freq->bandwidth, freq->center_freq1, freq->center_freq2);
|
||||
|
||||
|
@ -1,12 +1,14 @@
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -108,6 +108,26 @@ static void hostapd_reload_bss(struct ho
|
||||
@@ -112,6 +112,28 @@ static void hostapd_reload_bss(struct ho
|
||||
#endif /* CONFIG_NO_RADIUS */
|
||||
|
||||
ssid = &hapd->conf->ssid;
|
||||
+
|
||||
+ hostapd_set_freq(hapd, hapd->iconf->hw_mode, hapd->iface->freq,
|
||||
+ hapd->iconf->channel,
|
||||
+ hapd->iconf->enable_edmg,
|
||||
+ hapd->iconf->edmg_channel,
|
||||
+ hapd->iconf->ieee80211n,
|
||||
+ hapd->iconf->ieee80211ac,
|
||||
+ hapd->iconf->ieee80211ax,
|
||||
@ -27,7 +29,7 @@
|
||||
if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
|
||||
ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
|
||||
/*
|
||||
@@ -205,6 +225,7 @@ int hostapd_reload_config(struct hostapd
|
||||
@@ -213,6 +235,7 @@ int hostapd_reload_config(struct hostapd
|
||||
struct hostapd_data *hapd = iface->bss[0];
|
||||
struct hostapd_config *newconf, *oldconf;
|
||||
size_t j;
|
||||
@ -35,7 +37,7 @@
|
||||
|
||||
if (iface->config_fname == NULL) {
|
||||
/* Only in-memory config in use - assume it has been updated */
|
||||
@@ -255,24 +276,20 @@ int hostapd_reload_config(struct hostapd
|
||||
@@ -263,24 +286,20 @@ int hostapd_reload_config(struct hostapd
|
||||
}
|
||||
iface->conf = newconf;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -1378,15 +1378,35 @@ int ap_switch_channel(struct wpa_supplic
|
||||
@@ -1426,15 +1426,35 @@ int ap_switch_channel(struct wpa_supplic
|
||||
|
||||
|
||||
#ifdef CONFIG_CTRL_IFACE
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -2721,10 +2721,15 @@ static int wpa_driver_nl80211_del_beacon
|
||||
@@ -2778,10 +2778,15 @@ static int wpa_driver_nl80211_del_beacon
|
||||
struct nl_msg *msg;
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
return send_and_recv_msgs(drv, msg, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -5042,7 +5047,7 @@ static void nl80211_teardown_ap(struct i
|
||||
@@ -5250,7 +5255,7 @@ static void nl80211_teardown_ap(struct i
|
||||
nl80211_mgmt_unsubscribe(bss, "AP teardown");
|
||||
|
||||
nl80211_put_wiphy_data_ap(bss);
|
||||
@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -7353,8 +7358,6 @@ static int wpa_driver_nl80211_if_remove(
|
||||
@@ -7631,8 +7636,6 @@ static int wpa_driver_nl80211_if_remove(
|
||||
} else {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
|
||||
nl80211_teardown_ap(bss);
|
||||
@ -36,7 +36,7 @@
|
||||
nl80211_destroy_bss(bss);
|
||||
if (!bss->added_if)
|
||||
i802_set_iface_flags(bss, 0);
|
||||
@@ -7744,7 +7747,6 @@ static int wpa_driver_nl80211_deinit_ap(
|
||||
@@ -8006,7 +8009,6 @@ static int wpa_driver_nl80211_deinit_ap(
|
||||
if (!is_ap_interface(drv->nlmode))
|
||||
return -1;
|
||||
wpa_driver_nl80211_del_beacon(bss);
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
/*
|
||||
* If the P2P GO interface was dynamically added, then it is
|
||||
@@ -7764,7 +7766,6 @@ static int wpa_driver_nl80211_stop_ap(vo
|
||||
@@ -8026,7 +8028,6 @@ static int wpa_driver_nl80211_stop_ap(vo
|
||||
if (!is_ap_interface(drv->nlmode))
|
||||
return -1;
|
||||
wpa_driver_nl80211_del_beacon(bss);
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -60,6 +60,7 @@
|
||||
@@ -65,6 +65,7 @@
|
||||
#include "fst/fst_ctrl_iface.h"
|
||||
#include "config_file.h"
|
||||
#include "ctrl_iface.h"
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
#define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256
|
||||
@@ -78,6 +79,7 @@ static void hostapd_ctrl_iface_send(stru
|
||||
@@ -80,6 +81,7 @@ static void hostapd_ctrl_iface_send(stru
|
||||
enum wpa_msg_type type,
|
||||
const char *buf, size_t len);
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
static int hostapd_ctrl_iface_attach(struct hostapd_data *hapd,
|
||||
struct sockaddr_storage *from,
|
||||
@@ -129,6 +131,61 @@ static int hostapd_ctrl_iface_new_sta(st
|
||||
@@ -131,6 +133,61 @@ static int hostapd_ctrl_iface_new_sta(st
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -76,9 +76,9 @@
|
||||
+ iface->interfaces->config_read_cb = config_read_cb;
|
||||
+}
|
||||
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
#ifdef NEED_AP_MLME
|
||||
@@ -3195,6 +3252,8 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd,
|
||||
@@ -3499,6 +3556,8 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
} else if (os_strncmp(buf, "VENDOR ", 7) == 0) {
|
||||
reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply,
|
||||
reply_size);
|
||||
@ -89,7 +89,7 @@
|
||||
#ifdef RADIUS_SERVER
|
||||
--- a/src/ap/ctrl_iface_ap.c
|
||||
+++ b/src/ap/ctrl_iface_ap.c
|
||||
@@ -874,7 +874,13 @@ int hostapd_parse_csa_settings(const cha
|
||||
@@ -917,7 +917,13 @@ int hostapd_parse_csa_settings(const cha
|
||||
|
||||
int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
-include .config
|
||||
-include $(if $(MULTICALL),../hostapd/.config)
|
||||
|
||||
@@ -116,6 +120,8 @@ OBJS_c += ../src/utils/common.o
|
||||
@@ -118,6 +122,8 @@ OBJS_c += ../src/utils/common.o
|
||||
OBJS_c += ../src/common/cli.o
|
||||
OBJS += wmm_ac.o
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
--- a/wpa_supplicant/bss.h
|
||||
+++ b/wpa_supplicant/bss.h
|
||||
@@ -82,6 +82,10 @@ struct wpa_bss {
|
||||
@@ -83,6 +83,10 @@ struct wpa_bss {
|
||||
u8 ssid[SSID_MAX_LEN];
|
||||
/** Length of SSID */
|
||||
size_t ssid_len;
|
||||
@ -110,9 +110,9 @@
|
||||
break;
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -127,6 +127,55 @@ static void wpas_update_fils_connect_par
|
||||
#endif /* CONFIG_FILS && IEEE8021X_EAPOL */
|
||||
|
||||
@@ -129,6 +129,54 @@ static void wpas_update_fils_connect_par
|
||||
static void wpas_update_owe_connect_params(struct wpa_supplicant *wpa_s);
|
||||
#endif /* CONFIG_OWE */
|
||||
|
||||
+static int hostapd_stop(struct wpa_supplicant *wpa_s)
|
||||
+{
|
||||
@ -162,11 +162,10 @@
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
|
||||
#ifdef CONFIG_WEP
|
||||
/* Configure default/group WEP keys for static WEP */
|
||||
int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
|
||||
{
|
||||
@@ -940,12 +989,16 @@ void wpa_supplicant_set_state(struct wpa
|
||||
@@ -991,6 +1039,8 @@ void wpa_supplicant_set_state(struct wpa
|
||||
|
||||
sme_sched_obss_scan(wpa_s, 1);
|
||||
|
||||
@ -174,8 +173,9 @@
|
||||
+ hostapd_reload(wpa_s, wpa_s->current_bss);
|
||||
#if defined(CONFIG_FILS) && defined(IEEE8021X_EAPOL)
|
||||
if (!fils_hlp_sent && ssid && ssid->eap.erp)
|
||||
wpas_update_fils_connect_params(wpa_s);
|
||||
#endif /* CONFIG_FILS && IEEE8021X_EAPOL */
|
||||
update_fils_connect_params = true;
|
||||
@@ -1001,6 +1051,8 @@ void wpa_supplicant_set_state(struct wpa
|
||||
#endif /* CONFIG_OWE */
|
||||
} else if (state == WPA_DISCONNECTED || state == WPA_ASSOCIATING ||
|
||||
state == WPA_ASSOCIATED) {
|
||||
+ if (wpa_s->hostapd)
|
||||
@ -183,7 +183,7 @@
|
||||
wpa_s->new_connection = 1;
|
||||
wpa_drv_set_operstate(wpa_s, 0);
|
||||
#ifndef IEEE8021X_EAPOL
|
||||
@@ -2038,6 +2091,8 @@ void wpa_supplicant_associate(struct wpa
|
||||
@@ -2222,6 +2274,8 @@ void wpa_supplicant_associate(struct wpa
|
||||
wpa_ssid_txt(ssid->ssid, ssid->ssid_len),
|
||||
ssid->id);
|
||||
wpas_notify_mesh_group_started(wpa_s, ssid);
|
||||
@ -192,7 +192,7 @@
|
||||
#else /* CONFIG_MESH */
|
||||
wpa_msg(wpa_s, MSG_ERROR,
|
||||
"mesh mode support not included in the build");
|
||||
@@ -5716,6 +5771,16 @@ static int wpa_supplicant_init_iface(str
|
||||
@@ -6184,6 +6238,16 @@ static int wpa_supplicant_init_iface(str
|
||||
sizeof(wpa_s->bridge_ifname));
|
||||
}
|
||||
|
||||
@ -207,9 +207,9 @@
|
||||
+ }
|
||||
+
|
||||
/* RSNA Supplicant Key Management - INITIALIZE */
|
||||
eapol_sm_notify_portEnabled(wpa_s->eapol, FALSE);
|
||||
eapol_sm_notify_portValid(wpa_s->eapol, FALSE);
|
||||
@@ -6043,6 +6108,11 @@ static void wpa_supplicant_deinit_iface(
|
||||
eapol_sm_notify_portEnabled(wpa_s->eapol, false);
|
||||
eapol_sm_notify_portValid(wpa_s->eapol, false);
|
||||
@@ -6517,6 +6581,11 @@ static void wpa_supplicant_deinit_iface(
|
||||
if (terminate)
|
||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
|
||||
|
||||
@ -223,7 +223,7 @@
|
||||
wpa_s->ctrl_iface = NULL;
|
||||
--- a/wpa_supplicant/wpa_supplicant_i.h
|
||||
+++ b/wpa_supplicant/wpa_supplicant_i.h
|
||||
@@ -101,6 +101,11 @@ struct wpa_interface {
|
||||
@@ -104,6 +104,11 @@ struct wpa_interface {
|
||||
const char *ifname;
|
||||
|
||||
/**
|
||||
@ -235,7 +235,7 @@
|
||||
* bridge_ifname - Optional bridge interface name
|
||||
*
|
||||
* If the driver interface (ifname) is included in a Linux bridge
|
||||
@@ -516,6 +521,8 @@ struct wpa_supplicant {
|
||||
@@ -530,6 +535,8 @@ struct wpa_supplicant {
|
||||
#endif /* CONFIG_CTRL_IFACE_BINDER */
|
||||
char bridge_ifname[16];
|
||||
|
||||
@ -246,9 +246,9 @@
|
||||
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -2408,6 +2408,11 @@ static int hostapd_ctrl_iface_chan_switc
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -2665,6 +2665,11 @@ static int hostapd_ctrl_iface_chan_switc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ if (os_strstr(pos, " auto-ht")) {
|
||||
+ settings.freq_params.ht_enabled = iface->conf->ieee80211n;
|
||||
@ -260,7 +260,7 @@
|
||||
/* Save CHAN_SWITCH VHT config */
|
||||
--- a/src/ap/beacon.c
|
||||
+++ b/src/ap/beacon.c
|
||||
@@ -1403,11 +1403,6 @@ int ieee802_11_set_beacon(struct hostapd
|
||||
@@ -1460,11 +1460,6 @@ int ieee802_11_set_beacon(struct hostapd
|
||||
struct wpabuf *beacon, *proberesp, *assocresp;
|
||||
int res, ret = -1;
|
||||
|
||||
@ -274,7 +274,7 @@
|
||||
if (ieee802_11_build_ap_params(hapd, ¶ms) < 0)
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -4184,6 +4184,60 @@ static void wpas_event_assoc_reject(stru
|
||||
@@ -4499,6 +4499,60 @@ static void wpas_event_unprot_beacon(str
|
||||
}
|
||||
|
||||
|
||||
@ -335,7 +335,7 @@
|
||||
void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
@@ -4485,8 +4539,10 @@ void supplicant_event(void *ctx, enum wp
|
||||
@@ -4801,8 +4855,10 @@ void supplicant_event(void *ctx, enum wp
|
||||
channel_width_to_string(data->ch_switch.ch_width),
|
||||
data->ch_switch.cf1,
|
||||
data->ch_switch.cf2);
|
||||
@ -349,7 +349,7 @@
|
||||
wpa_s->current_ssid->frequency = data->ch_switch.freq;
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -5478,6 +5478,7 @@ union wpa_event_data {
|
||||
@@ -5669,6 +5669,7 @@ union wpa_event_data {
|
||||
|
||||
/**
|
||||
* struct ch_switch
|
||||
@ -357,7 +357,7 @@
|
||||
* @freq: Frequency of new channel in MHz
|
||||
* @ht_enabled: Whether this is an HT channel
|
||||
* @ch_offset: Secondary channel offset
|
||||
@@ -5486,6 +5487,7 @@ union wpa_event_data {
|
||||
@@ -5677,6 +5678,7 @@ union wpa_event_data {
|
||||
* @cf2: Center frequency 2
|
||||
*/
|
||||
struct ch_switch {
|
||||
@ -367,7 +367,7 @@
|
||||
int ch_offset;
|
||||
--- a/src/drivers/driver_nl80211_event.c
|
||||
+++ b/src/drivers/driver_nl80211_event.c
|
||||
@@ -536,7 +536,7 @@ static void mlme_event_ch_switch(struct
|
||||
@@ -541,7 +541,7 @@ static void mlme_event_ch_switch(struct
|
||||
struct nlattr *ifindex, struct nlattr *freq,
|
||||
struct nlattr *type, struct nlattr *bw,
|
||||
struct nlattr *cf1, struct nlattr *cf2,
|
||||
@ -376,7 +376,7 @@
|
||||
{
|
||||
struct i802_bss *bss;
|
||||
union wpa_event_data data;
|
||||
@@ -595,6 +595,8 @@ static void mlme_event_ch_switch(struct
|
||||
@@ -600,6 +600,8 @@ static void mlme_event_ch_switch(struct
|
||||
data.ch_switch.cf1 = nla_get_u32(cf1);
|
||||
if (cf2)
|
||||
data.ch_switch.cf2 = nla_get_u32(cf2);
|
||||
@ -385,7 +385,7 @@
|
||||
|
||||
if (finished)
|
||||
bss->freq = data.ch_switch.freq;
|
||||
@@ -2544,6 +2546,7 @@ static void do_process_drv_event(struct
|
||||
@@ -2689,6 +2691,7 @@ static void do_process_drv_event(struct
|
||||
tb[NL80211_ATTR_CHANNEL_WIDTH],
|
||||
tb[NL80211_ATTR_CENTER_FREQ1],
|
||||
tb[NL80211_ATTR_CENTER_FREQ2],
|
||||
@ -393,7 +393,7 @@
|
||||
0);
|
||||
break;
|
||||
case NL80211_CMD_CH_SWITCH_NOTIFY:
|
||||
@@ -2554,6 +2557,7 @@ static void do_process_drv_event(struct
|
||||
@@ -2699,6 +2702,7 @@ static void do_process_drv_event(struct
|
||||
tb[NL80211_ATTR_CHANNEL_WIDTH],
|
||||
tb[NL80211_ATTR_CENTER_FREQ1],
|
||||
tb[NL80211_ATTR_CENTER_FREQ2],
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/hostapd/Makefile
|
||||
+++ b/hostapd/Makefile
|
||||
@@ -220,6 +220,9 @@ endif
|
||||
@@ -222,6 +222,9 @@ endif
|
||||
ifdef CONFIG_NO_CTRL_IFACE
|
||||
CFLAGS += -DCONFIG_NO_CTRL_IFACE
|
||||
else
|
||||
@ -12,7 +12,7 @@
|
||||
else
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -3020,6 +3020,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
@@ -3323,6 +3323,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
reply_size);
|
||||
} else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
|
||||
reply_len = hostapd_drv_status(hapd, reply, reply_size);
|
||||
@ -20,7 +20,7 @@
|
||||
} else if (os_strcmp(buf, "MIB") == 0) {
|
||||
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
|
||||
if (reply_len >= 0) {
|
||||
@@ -3061,6 +3062,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
@@ -3364,6 +3365,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
||||
reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
|
||||
reply_size);
|
||||
@ -30,7 +30,7 @@
|
||||
reply_len = -1;
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -957,6 +957,9 @@ ifdef CONFIG_FILS
|
||||
@@ -942,6 +942,9 @@ ifdef CONFIG_FILS
|
||||
OBJS += ../src/ap/fils_hlp.o
|
||||
endif
|
||||
ifdef CONFIG_CTRL_IFACE
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
--- a/wpa_supplicant/ctrl_iface.c
|
||||
+++ b/wpa_supplicant/ctrl_iface.c
|
||||
@@ -2144,7 +2144,7 @@ static int wpa_supplicant_ctrl_iface_sta
|
||||
@@ -2257,7 +2257,7 @@ static int wpa_supplicant_ctrl_iface_sta
|
||||
pos += ret;
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
if (wpa_s->ap_iface) {
|
||||
pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
|
||||
end - pos,
|
||||
@@ -9962,6 +9962,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
@@ -10172,6 +10172,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
reply_len = -1;
|
||||
} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
|
||||
wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
|
||||
@ -59,7 +59,7 @@
|
||||
} else if (os_strcmp(buf, "MIB") == 0) {
|
||||
reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
|
||||
if (reply_len >= 0) {
|
||||
@@ -9974,6 +9975,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
@@ -10184,6 +10185,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
reply_size - reply_len);
|
||||
#endif /* CONFIG_MACSEC */
|
||||
}
|
||||
@ -67,7 +67,7 @@
|
||||
} else if (os_strncmp(buf, "STATUS", 6) == 0) {
|
||||
reply_len = wpa_supplicant_ctrl_iface_status(
|
||||
wpa_s, buf + 6, reply, reply_size);
|
||||
@@ -10458,6 +10460,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
@@ -10668,6 +10670,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
reply_len = wpa_supplicant_ctrl_iface_bss(
|
||||
wpa_s, buf + 4, reply, reply_size);
|
||||
#ifdef CONFIG_AP
|
||||
@ -75,7 +75,7 @@
|
||||
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
|
||||
reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
|
||||
} else if (os_strncmp(buf, "STA ", 4) == 0) {
|
||||
@@ -10466,12 +10469,15 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
@@ -10676,12 +10679,15 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
||||
reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
|
||||
reply_size);
|
||||
@ -101,7 +101,7 @@
|
||||
|
||||
static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen,
|
||||
size_t curr_len, const u8 *mcs_set)
|
||||
@@ -423,6 +424,7 @@ int hostapd_ctrl_iface_sta_next(struct h
|
||||
@@ -451,6 +452,7 @@ int hostapd_ctrl_iface_sta_next(struct h
|
||||
return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen);
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
|
||||
#ifdef CONFIG_P2P_MANAGER
|
||||
static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype,
|
||||
@@ -763,12 +765,12 @@ int hostapd_ctrl_iface_status(struct hos
|
||||
@@ -806,12 +808,12 @@ int hostapd_ctrl_iface_status(struct hos
|
||||
return len;
|
||||
len += ret;
|
||||
}
|
||||
@ -126,7 +126,7 @@
|
||||
if (os_snprintf_error(buflen - len, ret))
|
||||
--- a/src/ap/ieee802_1x.c
|
||||
+++ b/src/ap/ieee802_1x.c
|
||||
@@ -2706,6 +2706,7 @@ static const char * bool_txt(Boolean val
|
||||
@@ -2711,6 +2711,7 @@ static const char * bool_txt(bool val)
|
||||
return val ? "TRUE" : "FALSE";
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@
|
||||
|
||||
int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
|
||||
{
|
||||
@@ -2892,6 +2893,7 @@ int ieee802_1x_get_mib_sta(struct hostap
|
||||
@@ -2897,6 +2898,7 @@ int ieee802_1x_get_mib_sta(struct hostap
|
||||
return len;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
|
||||
--- a/src/ap/wpa_auth.c
|
||||
+++ b/src/ap/wpa_auth.c
|
||||
@@ -4116,6 +4116,7 @@ static const char * wpa_bool_txt(int val
|
||||
@@ -4351,6 +4351,7 @@ static const char * wpa_bool_txt(int val
|
||||
return val ? "TRUE" : "FALSE";
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@
|
||||
|
||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||
#define RSN_SUITE_ARG(s) \
|
||||
@@ -4264,7 +4265,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
|
||||
@@ -4501,7 +4502,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
|
||||
|
||||
return len;
|
||||
}
|
||||
@ -163,7 +163,7 @@
|
||||
{
|
||||
--- a/src/rsn_supp/wpa.c
|
||||
+++ b/src/rsn_supp/wpa.c
|
||||
@@ -2502,6 +2502,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
|
||||
@@ -2680,6 +2680,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
|
||||
}
|
||||
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||
#define RSN_SUITE_ARG(s) \
|
||||
((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
|
||||
@@ -2585,6 +2587,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
|
||||
@@ -2761,6 +2763,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
|
||||
|
||||
return (int) len;
|
||||
}
|
||||
@ -182,7 +182,7 @@
|
||||
|
||||
--- a/wpa_supplicant/ap.c
|
||||
+++ b/wpa_supplicant/ap.c
|
||||
@@ -1236,7 +1236,7 @@ int wpas_ap_wps_nfc_report_handover(stru
|
||||
@@ -1284,7 +1284,7 @@ int wpas_ap_wps_nfc_report_handover(stru
|
||||
#endif /* CONFIG_WPS */
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/hostapd/hostapd_cli.c
|
||||
+++ b/hostapd/hostapd_cli.c
|
||||
@@ -743,7 +743,7 @@ static int wpa_ctrl_command_sta(struct w
|
||||
@@ -744,7 +744,7 @@ static int wpa_ctrl_command_sta(struct w
|
||||
}
|
||||
|
||||
buf[len] = '\0';
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/src/common/wpa_common.c
|
||||
+++ b/src/common/wpa_common.c
|
||||
@@ -2089,6 +2089,31 @@ u32 wpa_akm_to_suite(int akm)
|
||||
@@ -2119,6 +2119,31 @@ u32 wpa_akm_to_suite(int akm)
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
int wpa_compare_rsn_ie(int ft_initial_assoc,
|
||||
const u8 *ie1, size_t ie1len,
|
||||
const u8 *ie2, size_t ie2len)
|
||||
@@ -2096,8 +2121,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
|
||||
@@ -2126,8 +2151,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
|
||||
if (ie1 == NULL || ie2 == NULL)
|
||||
return -1;
|
||||
|
||||
|
@ -1,22 +1,23 @@
|
||||
--- a/src/ap/wps_hostapd.c
|
||||
+++ b/src/ap/wps_hostapd.c
|
||||
@@ -346,8 +346,7 @@ static int hapd_wps_reconfig_in_memory(s
|
||||
@@ -394,9 +394,8 @@ static int hapd_wps_reconfig_in_memory(s
|
||||
bss->wpa_pairwise |= WPA_CIPHER_GCMP;
|
||||
else
|
||||
bss->wpa_pairwise |= WPA_CIPHER_CCMP;
|
||||
- }
|
||||
#ifndef CONFIG_NO_TKIP
|
||||
- if (cred->encr_type & WPS_ENCR_TKIP)
|
||||
+ } else if (cred->encr_type & WPS_ENCR_TKIP)
|
||||
bss->wpa_pairwise |= WPA_CIPHER_TKIP;
|
||||
#endif /* CONFIG_NO_TKIP */
|
||||
bss->rsn_pairwise = bss->wpa_pairwise;
|
||||
bss->wpa_group = wpa_select_ap_group_cipher(bss->wpa,
|
||||
@@ -1108,8 +1107,7 @@ int hostapd_init_wps(struct hostapd_data
|
||||
@@ -1178,8 +1177,7 @@ int hostapd_init_wps(struct hostapd_data
|
||||
WPA_CIPHER_GCMP_256)) {
|
||||
wps->encr_types |= WPS_ENCR_AES;
|
||||
wps->encr_types_rsn |= WPS_ENCR_AES;
|
||||
- }
|
||||
- if (conf->rsn_pairwise & WPA_CIPHER_TKIP) {
|
||||
+ } else if (conf->rsn_pairwise & WPA_CIPHER_TKIP) {
|
||||
wps->encr_types |= WPS_ENCR_TKIP;
|
||||
wps->encr_types_rsn |= WPS_ENCR_TKIP;
|
||||
}
|
||||
#ifdef CONFIG_NO_TKIP
|
||||
wpa_printf(MSG_INFO, "WPS: TKIP not supported");
|
||||
goto fail;
|
||||
|
@ -9,41 +9,37 @@
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
@@ -253,8 +253,8 @@ void wpa_printf(int level, const char *f
|
||||
@@ -255,7 +255,7 @@ void wpa_printf(int level, const char *f
|
||||
}
|
||||
|
||||
|
||||
-static void _wpa_hexdump(int level, const char *title, const u8 *buf,
|
||||
- size_t len, int show)
|
||||
+void _wpa_hexdump(int level, const char *title, const u8 *buf,
|
||||
+ size_t len, int show)
|
||||
size_t len, int show, int only_syslog)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@@ -380,20 +380,8 @@ static void _wpa_hexdump(int level, cons
|
||||
@@ -382,19 +382,7 @@ static void _wpa_hexdump(int level, cons
|
||||
#endif /* CONFIG_ANDROID_LOG */
|
||||
}
|
||||
|
||||
-void wpa_hexdump(int level, const char *title, const void *buf, size_t len)
|
||||
-{
|
||||
- _wpa_hexdump(level, title, buf, len, 1);
|
||||
- _wpa_hexdump(level, title, buf, len, 1, 0);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-void wpa_hexdump_key(int level, const char *title, const void *buf, size_t len)
|
||||
-{
|
||||
- _wpa_hexdump(level, title, buf, len, wpa_debug_show_keys);
|
||||
- _wpa_hexdump(level, title, buf, len, wpa_debug_show_keys, 0);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static void _wpa_hexdump_ascii(int level, const char *title, const void *buf,
|
||||
- size_t len, int show)
|
||||
+void _wpa_hexdump_ascii(int level, const char *title, const void *buf,
|
||||
+ size_t len, int show)
|
||||
size_t len, int show)
|
||||
{
|
||||
size_t i, llen;
|
||||
const u8 *pos = buf;
|
||||
@@ -506,20 +494,6 @@ static void _wpa_hexdump_ascii(int level
|
||||
@@ -507,20 +495,6 @@ file_done:
|
||||
}
|
||||
|
||||
|
||||
@ -64,7 +60,7 @@
|
||||
#ifdef CONFIG_DEBUG_FILE
|
||||
static char *last_path = NULL;
|
||||
#endif /* CONFIG_DEBUG_FILE */
|
||||
@@ -635,7 +609,7 @@ void wpa_msg_register_ifname_cb(wpa_msg_
|
||||
@@ -636,7 +610,7 @@ void wpa_msg_register_ifname_cb(wpa_msg_
|
||||
}
|
||||
|
||||
|
||||
@ -73,7 +69,7 @@
|
||||
{
|
||||
va_list ap;
|
||||
char *buf;
|
||||
@@ -673,7 +647,7 @@ void wpa_msg(void *ctx, int level, const
|
||||
@@ -674,7 +648,7 @@ void wpa_msg(void *ctx, int level, const
|
||||
}
|
||||
|
||||
|
||||
@ -84,13 +80,13 @@
|
||||
char *buf;
|
||||
--- a/src/utils/wpa_debug.h
|
||||
+++ b/src/utils/wpa_debug.h
|
||||
@@ -52,6 +52,17 @@ int wpa_debug_reopen_file(void);
|
||||
@@ -50,6 +50,17 @@ int wpa_debug_reopen_file(void);
|
||||
void wpa_debug_close_file(void);
|
||||
void wpa_debug_setup_stdout(void);
|
||||
|
||||
+/* internal */
|
||||
+void _wpa_hexdump(int level, const char *title, const u8 *buf,
|
||||
+ size_t len, int show);
|
||||
+ size_t len, int show, int only_syslog);
|
||||
+void _wpa_hexdump_ascii(int level, const char *title, const void *buf,
|
||||
+ size_t len, int show);
|
||||
+extern int wpa_debug_show_keys;
|
||||
@ -102,7 +98,7 @@
|
||||
/**
|
||||
* wpa_debug_printf_timestamp - Print timestamp for debug output
|
||||
*
|
||||
@@ -72,9 +83,15 @@ void wpa_debug_print_timestamp(void);
|
||||
@@ -70,9 +81,15 @@ void wpa_debug_print_timestamp(void);
|
||||
*
|
||||
* Note: New line '\n' is added to the end of the text when printing to stdout.
|
||||
*/
|
||||
@ -119,7 +115,7 @@
|
||||
/**
|
||||
* wpa_hexdump - conditional hex dump
|
||||
* @level: priority level (MSG_*) of the message
|
||||
@@ -86,7 +103,13 @@ PRINTF_FORMAT(2, 3);
|
||||
@@ -84,7 +101,13 @@ PRINTF_FORMAT(2, 3);
|
||||
* output may be directed to stdout, stderr, and/or syslog based on
|
||||
* configuration. The contents of buf is printed out has hex dump.
|
||||
*/
|
||||
@ -129,12 +125,12 @@
|
||||
+ if (level < CONFIG_MSG_MIN_PRIORITY)
|
||||
+ return;
|
||||
+
|
||||
+ _wpa_hexdump(level, title, buf, len, 1);
|
||||
+ _wpa_hexdump(level, title, buf, len, 1, 1);
|
||||
+}
|
||||
|
||||
static inline void wpa_hexdump_buf(int level, const char *title,
|
||||
const struct wpabuf *buf)
|
||||
@@ -108,7 +131,13 @@ static inline void wpa_hexdump_buf(int l
|
||||
@@ -106,7 +129,13 @@ static inline void wpa_hexdump_buf(int l
|
||||
* like wpa_hexdump(), but by default, does not include secret keys (passwords,
|
||||
* etc.) in debug output.
|
||||
*/
|
||||
@ -144,12 +140,12 @@
|
||||
+ if (level < CONFIG_MSG_MIN_PRIORITY)
|
||||
+ return;
|
||||
+
|
||||
+ _wpa_hexdump(level, title, buf, len, wpa_debug_show_keys);
|
||||
+ _wpa_hexdump(level, title, buf, len, wpa_debug_show_keys, 1);
|
||||
+}
|
||||
|
||||
static inline void wpa_hexdump_buf_key(int level, const char *title,
|
||||
const struct wpabuf *buf)
|
||||
@@ -130,8 +159,14 @@ static inline void wpa_hexdump_buf_key(i
|
||||
@@ -128,8 +157,14 @@ static inline void wpa_hexdump_buf_key(i
|
||||
* the hex numbers and ASCII characters (for printable range) are shown. 16
|
||||
* bytes per line will be shown.
|
||||
*/
|
||||
@ -166,7 +162,7 @@
|
||||
|
||||
/**
|
||||
* wpa_hexdump_ascii_key - conditional hex dump, hide keys
|
||||
@@ -147,8 +182,14 @@ void wpa_hexdump_ascii(int level, const
|
||||
@@ -145,8 +180,14 @@ void wpa_hexdump_ascii(int level, const
|
||||
* bytes per line will be shown. This works like wpa_hexdump_ascii(), but by
|
||||
* default, does not include secret keys (passwords, etc.) in debug output.
|
||||
*/
|
||||
@ -183,7 +179,7 @@
|
||||
|
||||
/*
|
||||
* wpa_dbg() behaves like wpa_msg(), but it can be removed from build to reduce
|
||||
@@ -185,7 +226,12 @@ void wpa_hexdump_ascii_key(int level, co
|
||||
@@ -183,7 +224,12 @@ void wpa_hexdump_ascii_key(int level, co
|
||||
*
|
||||
* Note: New line '\n' is added to the end of the text when printing to stdout.
|
||||
*/
|
||||
@ -197,7 +193,7 @@
|
||||
|
||||
/**
|
||||
* wpa_msg_ctrl - Conditional printf for ctrl_iface monitors
|
||||
@@ -199,8 +245,13 @@ void wpa_msg(void *ctx, int level, const
|
||||
@@ -197,8 +243,13 @@ void wpa_msg(void *ctx, int level, const
|
||||
* attached ctrl_iface monitors. In other words, it can be used for frequent
|
||||
* events that do not need to be sent to syslog.
|
||||
*/
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "crypto/random.h"
|
||||
#include "crypto/tls.h"
|
||||
#include "common/version.h"
|
||||
@@ -690,7 +691,7 @@ int main(int argc, char *argv[])
|
||||
@@ -688,7 +689,7 @@ int main(int argc, char *argv[])
|
||||
wpa_supplicant_event = hostapd_wpa_event;
|
||||
wpa_supplicant_event_global = hostapd_wpa_event_global;
|
||||
for (;;) {
|
||||
@ -17,7 +17,7 @@
|
||||
if (c < 0)
|
||||
break;
|
||||
switch (c) {
|
||||
@@ -727,6 +728,8 @@ int main(int argc, char *argv[])
|
||||
@@ -725,6 +726,8 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
#endif /* CONFIG_DEBUG_LINUX_TRACING */
|
||||
case 'v':
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/hostapd/hostapd_cli.c
|
||||
+++ b/hostapd/hostapd_cli.c
|
||||
@@ -385,7 +385,6 @@ static int hostapd_cli_cmd_disassociate(
|
||||
@@ -388,7 +388,6 @@ static int hostapd_cli_cmd_disassociate(
|
||||
}
|
||||
|
||||
|
||||
@ -8,23 +8,23 @@
|
||||
static int hostapd_cli_cmd_signature(struct wpa_ctrl *ctrl, int argc,
|
||||
char *argv[])
|
||||
{
|
||||
@@ -398,7 +397,6 @@ static int hostapd_cli_cmd_signature(str
|
||||
@@ -401,7 +400,6 @@ static int hostapd_cli_cmd_signature(str
|
||||
os_snprintf(buf, sizeof(buf), "SIGNATURE %s", argv[0]);
|
||||
return wpa_ctrl_command(ctrl, buf);
|
||||
}
|
||||
-#endif /* CONFIG_TAXONOMY */
|
||||
|
||||
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
@@ -417,7 +415,6 @@ static int hostapd_cli_cmd_sa_query(stru
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
static int hostapd_cli_cmd_sa_query(struct wpa_ctrl *ctrl, int argc,
|
||||
@@ -418,7 +416,6 @@ static int hostapd_cli_cmd_sa_query(stru
|
||||
}
|
||||
|
||||
|
||||
-#ifdef CONFIG_WPS
|
||||
static int hostapd_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc,
|
||||
char *argv[])
|
||||
{
|
||||
@@ -643,7 +640,6 @@ static int hostapd_cli_cmd_wps_config(st
|
||||
@@ -644,7 +641,6 @@ static int hostapd_cli_cmd_wps_config(st
|
||||
ssid_hex, argv[1]);
|
||||
return wpa_ctrl_command(ctrl, buf);
|
||||
}
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc,
|
||||
@@ -1538,15 +1534,12 @@ static const struct hostapd_cli_cmd host
|
||||
@@ -1532,13 +1528,10 @@ static const struct hostapd_cli_cmd host
|
||||
{ "disassociate", hostapd_cli_cmd_disassociate,
|
||||
hostapd_complete_stations,
|
||||
"<addr> = disassociate a station" },
|
||||
@ -40,15 +40,13 @@
|
||||
{ "signature", hostapd_cli_cmd_signature, hostapd_complete_stations,
|
||||
"<addr> = get taxonomy signature for a station" },
|
||||
-#endif /* CONFIG_TAXONOMY */
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
{ "sa_query", hostapd_cli_cmd_sa_query, hostapd_complete_stations,
|
||||
"<addr> = send SA Query to a station" },
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
-#ifdef CONFIG_WPS
|
||||
{ "wps_pin", hostapd_cli_cmd_wps_pin, NULL,
|
||||
"<uuid> <pin> [timeout] [addr] = add WPS Enrollee PIN" },
|
||||
{ "wps_check_pin", hostapd_cli_cmd_wps_check_pin, NULL,
|
||||
@@ -1571,7 +1564,6 @@ static const struct hostapd_cli_cmd host
|
||||
@@ -1563,7 +1556,6 @@ static const struct hostapd_cli_cmd host
|
||||
"<SSID> <auth> <encr> <key> = configure AP" },
|
||||
{ "wps_get_status", hostapd_cli_cmd_wps_get_status, NULL,
|
||||
"= show current WPS status" },
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
#ifndef CONFIG_NO_HOSTAPD_LOGGER
|
||||
@@ -149,6 +151,14 @@ static void hostapd_logger_cb(void *ctx,
|
||||
@@ -146,6 +148,14 @@ static void hostapd_logger_cb(void *ctx,
|
||||
}
|
||||
#endif /* CONFIG_NO_HOSTAPD_LOGGER */
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
/**
|
||||
* hostapd_driver_init - Preparate driver interface
|
||||
@@ -167,6 +177,8 @@ static int hostapd_driver_init(struct ho
|
||||
@@ -164,6 +174,8 @@ static int hostapd_driver_init(struct ho
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
/* Initialize the driver interface */
|
||||
if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
|
||||
b = NULL;
|
||||
@@ -407,8 +419,6 @@ static void hostapd_global_deinit(const
|
||||
@@ -404,8 +416,6 @@ static void hostapd_global_deinit(const
|
||||
#endif /* CONFIG_NATIVE_WINDOWS */
|
||||
|
||||
eap_server_unregister_methods();
|
||||
@ -42,7 +42,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -434,18 +444,6 @@ static int hostapd_global_run(struct hap
|
||||
@@ -431,18 +441,6 @@ static int hostapd_global_run(struct hap
|
||||
}
|
||||
#endif /* EAP_SERVER_TNC */
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
eloop_run();
|
||||
|
||||
return 0;
|
||||
@@ -647,8 +645,7 @@ int main(int argc, char *argv[])
|
||||
@@ -645,8 +643,7 @@ int main(int argc, char *argv[])
|
||||
struct hapd_interfaces interfaces;
|
||||
int ret = 1;
|
||||
size_t i, j;
|
||||
|
@ -22,7 +22,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
#include "common/defs.h"
|
||||
#include "common/ieee802_11_defs.h"
|
||||
#include "common/wpa_common.h"
|
||||
@@ -819,6 +820,9 @@ struct wpa_driver_associate_params {
|
||||
@@ -850,6 +851,9 @@ struct wpa_driver_associate_params {
|
||||
* responsible for selecting with which BSS to associate. */
|
||||
const u8 *bssid;
|
||||
|
||||
@ -34,7 +34,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
*
|
||||
--- a/wpa_supplicant/config.c
|
||||
+++ b/wpa_supplicant/config.c
|
||||
@@ -17,6 +17,7 @@
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "eap_peer/eap.h"
|
||||
#include "p2p/p2p.h"
|
||||
#include "fst/fst.h"
|
||||
@ -42,7 +42,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
#include "config.h"
|
||||
|
||||
|
||||
@@ -2130,6 +2131,97 @@ static char * wpa_config_write_peerkey(c
|
||||
@@ -2269,6 +2270,97 @@ static char * wpa_config_write_peerkey(c
|
||||
#endif /* NO_CONFIG_WRITE */
|
||||
|
||||
|
||||
@ -140,7 +140,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
/* Helper macros for network block parser */
|
||||
|
||||
#ifdef OFFSET
|
||||
@@ -2382,6 +2474,8 @@ static const struct parse_data ssid_fiel
|
||||
@@ -2551,6 +2643,8 @@ static const struct parse_data ssid_fiel
|
||||
{ INT(ap_max_inactivity) },
|
||||
{ INT(dtim_period) },
|
||||
{ INT(beacon_int) },
|
||||
@ -162,7 +162,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
|
||||
|
||||
#define DEFAULT_EAP_WORKAROUND ((unsigned int) -1)
|
||||
@@ -790,6 +792,9 @@ struct wpa_ssid {
|
||||
@@ -832,6 +834,9 @@ struct wpa_ssid {
|
||||
*/
|
||||
void *parent_cred;
|
||||
|
||||
@ -174,11 +174,11 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
* macsec_policy - Determines the policy for MACsec secure session
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -3266,6 +3266,12 @@ static void wpas_start_assoc_cb(struct w
|
||||
@@ -3615,6 +3615,12 @@ static void wpas_start_assoc_cb(struct w
|
||||
params.beacon_int = ssid->beacon_int;
|
||||
else
|
||||
params.beacon_int = wpa_s->conf->beacon_int;
|
||||
+ i = 0;
|
||||
+ int i = 0;
|
||||
+ while (i < WLAN_SUPP_RATES_MAX) {
|
||||
+ params.rates[i] = ssid->rates[i];
|
||||
+ i++;
|
||||
@ -186,4 +186,4 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
+ params.mcast_rate = ssid->mcast_rate;
|
||||
}
|
||||
|
||||
params.pairwise_suite = cipher_pairwise;
|
||||
if (bss && ssid->enable_edmg)
|
||||
|
@ -10,7 +10,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -5323,7 +5323,7 @@ static int wpa_driver_nl80211_ibss(struc
|
||||
@@ -5573,7 +5573,7 @@ static int wpa_driver_nl80211_ibss(struc
|
||||
struct wpa_driver_associate_params *params)
|
||||
{
|
||||
struct nl_msg *msg;
|
||||
@ -19,7 +19,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
int count = 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex);
|
||||
@@ -5350,6 +5350,37 @@ retry:
|
||||
@@ -5600,6 +5600,37 @@ retry:
|
||||
nl80211_put_beacon_int(msg, params->beacon_int))
|
||||
goto fail;
|
||||
|
||||
|
@ -19,17 +19,17 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -1484,6 +1484,7 @@ struct wpa_driver_mesh_join_params {
|
||||
@@ -1546,6 +1546,7 @@ struct wpa_driver_mesh_join_params {
|
||||
#define WPA_DRIVER_MESH_FLAG_SAE_AUTH 0x00000004
|
||||
#define WPA_DRIVER_MESH_FLAG_AMPE 0x00000008
|
||||
unsigned int flags;
|
||||
u8 handle_dfs;
|
||||
+ int mcast_rate;
|
||||
};
|
||||
|
||||
/**
|
||||
struct wpa_driver_set_key_params {
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -9612,6 +9612,18 @@ static int nl80211_put_mesh_id(struct nl
|
||||
@@ -9959,6 +9959,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,
|
||||
struct wpa_driver_mesh_bss_params *params)
|
||||
{
|
||||
@@ -9673,6 +9685,7 @@ static int nl80211_join_mesh(struct i802
|
||||
@@ -10017,6 +10029,7 @@ static int nl80211_join_mesh(struct i802
|
||||
nl80211_put_basic_rates(msg, params->basic_rates) ||
|
||||
nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
|
||||
nl80211_put_beacon_int(msg, params->beacon_int) ||
|
||||
@ -58,7 +58,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||
|
||||
--- a/wpa_supplicant/mesh.c
|
||||
+++ b/wpa_supplicant/mesh.c
|
||||
@@ -494,6 +494,7 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
@@ -460,6 +460,7 @@ int wpa_supplicant_join_mesh(struct wpa_
|
||||
|
||||
params->meshid = ssid->ssid;
|
||||
params->meshid_len = ssid->ssid_len;
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -2216,11 +2216,13 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
@@ -2402,11 +2402,13 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
for (j = 0; j < wpa_s->last_scan_res_used; j++) {
|
||||
struct wpa_bss *bss = wpa_s->last_scan_res[j];
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/src/ap/acs.c
|
||||
+++ b/src/ap/acs.c
|
||||
@@ -293,18 +293,12 @@ static void acs_fail(struct hostapd_ifac
|
||||
@@ -302,18 +302,12 @@ static void acs_fail(struct hostapd_ifac
|
||||
static long double
|
||||
acs_survey_interference_factor(struct freq_survey *survey, s8 min_nf)
|
||||
{
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
total = survey->channel_time;
|
||||
|
||||
@@ -406,20 +400,19 @@ static int acs_usable_vht160_chan(const
|
||||
@@ -415,20 +409,19 @@ static int acs_usable_vht160_chan(const
|
||||
static int acs_survey_is_sufficient(struct freq_survey *survey)
|
||||
{
|
||||
if (!(survey->filled & SURVEY_HAS_NF)) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/hostapd/Makefile
|
||||
+++ b/hostapd/Makefile
|
||||
@@ -1332,14 +1332,14 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
|
||||
@@ -1310,14 +1310,14 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
|
||||
@$(AR) cr $@ hostapd_multi.o $(OBJS)
|
||||
|
||||
hostapd: $(BCHECK) $(OBJS)
|
||||
@ -19,7 +19,7 @@
|
||||
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -1932,23 +1932,23 @@ wpa_supplicant_multi.a: .config $(BCHECK
|
||||
@@ -1920,23 +1920,23 @@ wpa_supplicant_multi.a: .config $(BCHECK
|
||||
@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
|
||||
|
||||
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/hostapd/Makefile
|
||||
+++ b/hostapd/Makefile
|
||||
@@ -165,6 +165,11 @@ OBJS += ../src/common/hw_features_common
|
||||
@@ -167,6 +167,11 @@ OBJS += ../src/common/hw_features_common
|
||||
|
||||
OBJS += ../src/eapol_auth/eapol_auth_sm.o
|
||||
|
||||
@ -22,15 +22,16 @@
|
||||
|
||||
#define OCE_STA_CFON_ENABLED(hapd) \
|
||||
((hapd->conf->oce & OCE_STA_CFON) && \
|
||||
@@ -72,6 +73,7 @@ struct hapd_interfaces {
|
||||
#ifdef CONFIG_DPP
|
||||
struct dpp_global *dpp;
|
||||
#endif /* CONFIG_DPP */
|
||||
@@ -80,7 +81,7 @@ struct hapd_interfaces {
|
||||
#ifdef CONFIG_CTRL_IFACE_UDP
|
||||
unsigned char ctrl_iface_cookie[CTRL_IFACE_COOKIE_LEN];
|
||||
#endif /* CONFIG_CTRL_IFACE_UDP */
|
||||
-
|
||||
+ struct ubus_object ubus;
|
||||
};
|
||||
|
||||
enum hostapd_chan_status {
|
||||
@@ -145,6 +147,7 @@ struct hostapd_data {
|
||||
@@ -154,6 +155,7 @@ struct hostapd_data {
|
||||
struct hostapd_iface *iface;
|
||||
struct hostapd_config *iconf;
|
||||
struct hostapd_bss_config *conf;
|
||||
@ -38,7 +39,7 @@
|
||||
int interface_added; /* virtual interface added for this BSS */
|
||||
unsigned int started:1;
|
||||
unsigned int disabled:1;
|
||||
@@ -580,6 +583,7 @@ hostapd_alloc_bss_data(struct hostapd_if
|
||||
@@ -588,6 +590,7 @@ hostapd_alloc_bss_data(struct hostapd_if
|
||||
struct hostapd_bss_config *bss);
|
||||
int hostapd_setup_interface(struct hostapd_iface *iface);
|
||||
int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
|
||||
@ -48,15 +49,15 @@
|
||||
struct hostapd_iface * hostapd_alloc_iface(void);
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -380,6 +380,7 @@ static void hostapd_free_hapd_data(struc
|
||||
@@ -391,6 +391,7 @@ static void hostapd_free_hapd_data(struc
|
||||
hapd->beacon_set_done = 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
|
||||
+ hostapd_ubus_free_bss(hapd);
|
||||
iapp_deinit(hapd->iapp);
|
||||
hapd->iapp = NULL;
|
||||
accounting_deinit(hapd);
|
||||
@@ -1377,6 +1378,8 @@ static int hostapd_setup_bss(struct host
|
||||
hostapd_deinit_wpa(hapd);
|
||||
vlan_deinit(hapd);
|
||||
@@ -1392,6 +1393,8 @@ static int hostapd_setup_bss(struct host
|
||||
if (hapd->driver && hapd->driver->set_operstate)
|
||||
hapd->driver->set_operstate(hapd->drv_priv, 1);
|
||||
|
||||
@ -65,15 +66,15 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1891,6 +1894,7 @@ static int hostapd_setup_interface_compl
|
||||
@@ -1967,6 +1970,7 @@ static int hostapd_setup_interface_compl
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
+ hostapd_ubus_add_iface(iface);
|
||||
wpa_printf(MSG_DEBUG, "Completing interface initialization");
|
||||
if (iface->conf->channel) {
|
||||
if (iface->freq) {
|
||||
#ifdef NEED_AP_MLME
|
||||
@@ -2087,6 +2091,7 @@ dfs_offload:
|
||||
@@ -2157,6 +2161,7 @@ dfs_offload:
|
||||
|
||||
fail:
|
||||
wpa_printf(MSG_ERROR, "Interface initialization failed");
|
||||
@ -81,7 +82,7 @@
|
||||
hostapd_set_state(iface, HAPD_IFACE_DISABLED);
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
|
||||
#ifdef CONFIG_FST
|
||||
@@ -2562,6 +2567,7 @@ void hostapd_interface_deinit_free(struc
|
||||
@@ -2630,6 +2635,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;
|
||||
@ -91,7 +92,7 @@
|
||||
__func__, driver, drv_priv);
|
||||
--- a/src/ap/ieee802_11.c
|
||||
+++ b/src/ap/ieee802_11.c
|
||||
@@ -2032,7 +2032,7 @@ static void handle_auth(struct hostapd_d
|
||||
@@ -2252,13 +2252,18 @@ static void handle_auth(struct hostapd_d
|
||||
u16 auth_alg, auth_transaction, status_code;
|
||||
u16 resp = WLAN_STATUS_SUCCESS;
|
||||
struct sta_info *sta = NULL;
|
||||
@ -99,11 +100,10 @@
|
||||
+ int res, reply_res, ubus_resp;
|
||||
u16 fc;
|
||||
const u8 *challenge = NULL;
|
||||
u32 session_timeout, acct_interim_interval;
|
||||
@@ -2043,6 +2043,11 @@ static void handle_auth(struct hostapd_d
|
||||
char *identity = NULL;
|
||||
char *radius_cui = NULL;
|
||||
u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN];
|
||||
size_t resp_ies_len = 0;
|
||||
u16 seq_ctrl;
|
||||
struct radius_sta rad_info;
|
||||
+ struct hostapd_ubus_request req = {
|
||||
+ .type = HOSTAPD_UBUS_AUTH_REQ,
|
||||
+ .mgmt_frame = mgmt,
|
||||
@ -112,7 +112,7 @@
|
||||
|
||||
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
|
||||
wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
|
||||
@@ -2204,6 +2209,13 @@ static void handle_auth(struct hostapd_d
|
||||
@@ -2418,6 +2423,13 @@ static void handle_auth(struct hostapd_d
|
||||
resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
||||
goto fail;
|
||||
}
|
||||
@ -126,18 +126,18 @@
|
||||
if (res == HOSTAPD_ACL_PENDING)
|
||||
return;
|
||||
|
||||
@@ -3862,7 +3874,7 @@ static void handle_assoc(struct hostapd_
|
||||
u16 capab_info, listen_interval, seq_ctrl, fc;
|
||||
u16 resp = WLAN_STATUS_SUCCESS, reply_res;
|
||||
@@ -4078,7 +4090,7 @@ static void handle_assoc(struct hostapd_
|
||||
int resp = WLAN_STATUS_SUCCESS;
|
||||
u16 reply_res;
|
||||
const u8 *pos;
|
||||
- int left, i;
|
||||
+ int left, i, ubus_resp;
|
||||
struct sta_info *sta;
|
||||
u8 *tmp = NULL;
|
||||
struct hostapd_sta_wpa_psk_short *psk = NULL;
|
||||
@@ -3871,6 +3883,11 @@ static void handle_assoc(struct hostapd_
|
||||
#ifdef CONFIG_FILS
|
||||
int delay_assoc = 0;
|
||||
@@ -4291,6 +4303,11 @@ static void handle_assoc(struct hostapd_
|
||||
left = res;
|
||||
}
|
||||
#endif /* CONFIG_FILS */
|
||||
+ struct hostapd_ubus_request req = {
|
||||
+ .type = HOSTAPD_UBUS_ASSOC_REQ,
|
||||
@ -145,11 +145,11 @@
|
||||
+ .ssi_signal = rssi,
|
||||
+ };
|
||||
|
||||
if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_req) :
|
||||
sizeof(mgmt->u.assoc_req))) {
|
||||
@@ -4050,6 +4067,14 @@ static void handle_assoc(struct hostapd_
|
||||
}
|
||||
#endif /* CONFIG_MBO */
|
||||
/* followed by SSID and Supported rates; and HT capabilities if 802.11n
|
||||
* is used */
|
||||
@@ -4455,6 +4472,14 @@ static void handle_assoc(struct hostapd_
|
||||
pos, left, rssi, omit_rsnxe);
|
||||
os_free(tmp);
|
||||
|
||||
+ ubus_resp = hostapd_ubus_handle_event(hapd, &req);
|
||||
+ if (ubus_resp) {
|
||||
@ -160,9 +160,9 @@
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* sta->capability is used in check_assoc_ies() for RRM enabled
|
||||
* capability element.
|
||||
@@ -4277,6 +4302,7 @@ static void handle_disassoc(struct hosta
|
||||
* Remove the station in case tranmission of a success response fails
|
||||
* (the STA was added associated to the driver) or if the station was
|
||||
@@ -4482,6 +4507,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));
|
||||
@ -170,7 +170,7 @@
|
||||
|
||||
sta = ap_get_sta(hapd, mgmt->sa);
|
||||
if (sta == NULL) {
|
||||
@@ -4342,6 +4368,8 @@ static void handle_deauth(struct hostapd
|
||||
@@ -4548,6 +4574,8 @@ static void handle_deauth(struct hostapd
|
||||
" reason_code=%d",
|
||||
MAC2STR(mgmt->sa), le_to_host16(mgmt->u.deauth.reason_code));
|
||||
|
||||
@ -181,10 +181,10 @@
|
||||
wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying "
|
||||
--- a/src/ap/beacon.c
|
||||
+++ b/src/ap/beacon.c
|
||||
@@ -746,6 +746,12 @@ void handle_probe_req(struct hostapd_dat
|
||||
struct hostapd_sta_wpa_psk_short *psk = NULL;
|
||||
char *identity = NULL;
|
||||
char *radius_cui = NULL;
|
||||
@@ -810,6 +810,12 @@ void handle_probe_req(struct hostapd_dat
|
||||
u16 csa_offs[2];
|
||||
size_t csa_offs_len;
|
||||
struct radius_sta rad_info;
|
||||
+ struct hostapd_ubus_request req = {
|
||||
+ .type = HOSTAPD_UBUS_PROBE_REQ,
|
||||
+ .mgmt_frame = mgmt,
|
||||
@ -194,7 +194,7 @@
|
||||
|
||||
if (len < IEEE80211_HDRLEN)
|
||||
return;
|
||||
@@ -923,6 +929,12 @@ void handle_probe_req(struct hostapd_dat
|
||||
@@ -992,6 +998,12 @@ void handle_probe_req(struct hostapd_dat
|
||||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
@ -209,9 +209,9 @@
|
||||
|
||||
--- a/src/ap/drv_callbacks.c
|
||||
+++ b/src/ap/drv_callbacks.c
|
||||
@@ -118,6 +118,10 @@ int hostapd_notif_assoc(struct hostapd_d
|
||||
@@ -119,6 +119,10 @@ int hostapd_notif_assoc(struct hostapd_d
|
||||
u16 reason = WLAN_REASON_UNSPECIFIED;
|
||||
u16 status = WLAN_STATUS_SUCCESS;
|
||||
int status = WLAN_STATUS_SUCCESS;
|
||||
const u8 *p2p_dev_addr = NULL;
|
||||
+ struct hostapd_ubus_request req = {
|
||||
+ .type = HOSTAPD_UBUS_ASSOC_REQ,
|
||||
@ -220,7 +220,7 @@
|
||||
|
||||
if (addr == NULL) {
|
||||
/*
|
||||
@@ -210,6 +214,12 @@ int hostapd_notif_assoc(struct hostapd_d
|
||||
@@ -211,6 +215,12 @@ int hostapd_notif_assoc(struct hostapd_d
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -235,7 +235,7 @@
|
||||
wpabuf_free(sta->p2p_ie);
|
||||
--- a/src/ap/sta_info.c
|
||||
+++ b/src/ap/sta_info.c
|
||||
@@ -424,6 +424,7 @@ void ap_handle_timer(void *eloop_ctx, vo
|
||||
@@ -423,6 +423,7 @@ void ap_handle_timer(void *eloop_ctx, vo
|
||||
HOSTAPD_LEVEL_INFO, "deauthenticated due to "
|
||||
"local deauth request");
|
||||
ap_free_sta(hapd, sta);
|
||||
@ -251,7 +251,7 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1284,6 +1286,7 @@ void ap_sta_set_authorized(struct hostap
|
||||
@@ -1293,6 +1295,7 @@ void ap_sta_set_authorized(struct hostap
|
||||
buf, ip_addr, keyid_buf);
|
||||
} else {
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED "%s", buf);
|
||||
@ -261,7 +261,7 @@
|
||||
hapd->msg_ctx_parent != hapd->msg_ctx)
|
||||
--- a/src/ap/wpa_auth_glue.c
|
||||
+++ b/src/ap/wpa_auth_glue.c
|
||||
@@ -185,6 +185,7 @@ static void hostapd_wpa_auth_psk_failure
|
||||
@@ -251,6 +251,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));
|
||||
@ -271,7 +271,7 @@
|
||||
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -188,6 +188,12 @@ ifdef CONFIG_EAPOL_TEST
|
||||
@@ -190,6 +190,12 @@ ifdef CONFIG_EAPOL_TEST
|
||||
CFLAGS += -Werror -DEAPOL_TEST
|
||||
endif
|
||||
|
||||
@ -284,19 +284,19 @@
|
||||
ifdef CONFIG_CODE_COVERAGE
|
||||
CFLAGS += -O0 -fprofile-arcs -ftest-coverage
|
||||
LIBS += -lgcov
|
||||
@@ -945,6 +951,9 @@ endif
|
||||
ifdef CONFIG_IEEE80211AX
|
||||
OBJS += ../src/ap/ieee802_11_he.o
|
||||
@@ -877,6 +883,9 @@ OBJS += ../src/pae/ieee802_1x_secy_ops.o
|
||||
ifdef CONFIG_AP
|
||||
OBJS += ../src/ap/wpa_auth_kay.o
|
||||
endif
|
||||
+ifdef CONFIG_UBUS
|
||||
+OBJS += ../src/ap/ubus.o
|
||||
+endif
|
||||
endif
|
||||
ifdef CONFIG_WNM_AP
|
||||
CFLAGS += -DCONFIG_WNM_AP
|
||||
|
||||
ifdef CONFIG_IEEE8021X_EAPOL
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -6297,6 +6297,8 @@ struct wpa_supplicant * wpa_supplicant_a
|
||||
@@ -6771,6 +6771,8 @@ struct wpa_supplicant * wpa_supplicant_a
|
||||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
@ -305,7 +305,7 @@
|
||||
return wpa_s;
|
||||
}
|
||||
|
||||
@@ -6323,6 +6325,8 @@ int wpa_supplicant_remove_iface(struct w
|
||||
@@ -6797,6 +6799,8 @@ int wpa_supplicant_remove_iface(struct w
|
||||
struct wpa_supplicant *parent = wpa_s->parent;
|
||||
#endif /* CONFIG_MESH */
|
||||
|
||||
@ -314,7 +314,7 @@
|
||||
/* Remove interface from the global list of interfaces */
|
||||
prev = global->ifaces;
|
||||
if (prev == wpa_s) {
|
||||
@@ -6626,8 +6630,12 @@ int wpa_supplicant_run(struct wpa_global
|
||||
@@ -7100,8 +7104,12 @@ int wpa_supplicant_run(struct wpa_global
|
||||
eloop_register_signal_terminate(wpa_supplicant_terminate, global);
|
||||
eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
|
||||
|
||||
@ -337,7 +337,7 @@
|
||||
|
||||
extern const char *const wpa_supplicant_version;
|
||||
extern const char *const wpa_supplicant_license;
|
||||
@@ -306,6 +307,8 @@ struct wpa_global {
|
||||
@@ -310,6 +311,8 @@ struct wpa_global {
|
||||
#endif /* CONFIG_WIFI_DISPLAY */
|
||||
|
||||
struct psk_list_entry *add_psk; /* From group formation */
|
||||
@ -346,7 +346,7 @@
|
||||
};
|
||||
|
||||
|
||||
@@ -506,6 +509,7 @@ struct wpa_supplicant {
|
||||
@@ -520,6 +523,7 @@ struct wpa_supplicant {
|
||||
unsigned char own_addr[ETH_ALEN];
|
||||
unsigned char perm_addr[ETH_ALEN];
|
||||
char ifname[100];
|
||||
@ -375,7 +375,7 @@
|
||||
|
||||
--- a/hostapd/main.c
|
||||
+++ b/hostapd/main.c
|
||||
@@ -894,6 +894,7 @@ int main(int argc, char *argv[])
|
||||
@@ -892,6 +892,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
hostapd_global_ctrl_iface_init(&interfaces);
|
||||
@ -383,7 +383,7 @@
|
||||
|
||||
if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
|
||||
wpa_printf(MSG_ERROR, "Failed to start eloop");
|
||||
@@ -903,6 +904,7 @@ int main(int argc, char *argv[])
|
||||
@@ -901,6 +902,7 @@ int main(int argc, char *argv[])
|
||||
ret = 0;
|
||||
|
||||
out:
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -2470,6 +2470,8 @@ static int hostapd_config_fill(struct ho
|
||||
@@ -2460,6 +2460,8 @@ static int hostapd_config_fill(struct ho
|
||||
bss->isolate = atoi(pos);
|
||||
} else if (os_strcmp(buf, "ap_max_inactivity") == 0) {
|
||||
bss->ap_max_inactivity = atoi(pos);
|
||||
@ -9,18 +9,18 @@
|
||||
} else if (os_strcmp(buf, "skip_inactivity_poll") == 0) {
|
||||
bss->skip_inactivity_poll = atoi(pos);
|
||||
} else if (os_strcmp(buf, "country_code") == 0) {
|
||||
@@ -3131,6 +3133,8 @@ static int hostapd_config_fill(struct ho
|
||||
@@ -3156,6 +3158,8 @@ static int hostapd_config_fill(struct ho
|
||||
}
|
||||
} else if (os_strcmp(buf, "acs_exclude_dfs") == 0) {
|
||||
conf->acs_exclude_dfs = atoi(pos);
|
||||
+ } else if (os_strcmp(buf, "radio_config_id") == 0) {
|
||||
+ conf->config_id = os_strdup(pos);
|
||||
} else if (os_strcmp(buf, "op_class") == 0) {
|
||||
conf->op_class = atoi(pos);
|
||||
} else if (os_strcmp(buf, "channel") == 0) {
|
||||
if (os_strcmp(pos, "acs_survey") == 0) {
|
||||
#ifndef CONFIG_ACS
|
||||
--- a/src/ap/ap_config.c
|
||||
+++ b/src/ap/ap_config.c
|
||||
@@ -698,6 +698,7 @@ void hostapd_config_free_bss(struct host
|
||||
@@ -772,6 +772,7 @@ void hostapd_config_free_bss(struct host
|
||||
os_free(conf->radius_req_attr_sqlite);
|
||||
os_free(conf->rsn_preauth_interfaces);
|
||||
os_free(conf->ctrl_interface);
|
||||
@ -28,7 +28,7 @@
|
||||
os_free(conf->ca_cert);
|
||||
os_free(conf->server_cert);
|
||||
os_free(conf->server_cert2);
|
||||
@@ -881,6 +882,7 @@ void hostapd_config_free(struct hostapd_
|
||||
@@ -964,6 +965,7 @@ void hostapd_config_free(struct hostapd_
|
||||
|
||||
for (i = 0; i < conf->num_bss; i++)
|
||||
hostapd_config_free_bss(conf->bss[i]);
|
||||
@ -38,7 +38,7 @@
|
||||
os_free(conf->basic_rates);
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -829,6 +829,7 @@ struct hostapd_bss_config {
|
||||
@@ -859,6 +859,7 @@ struct hostapd_bss_config {
|
||||
*/
|
||||
u8 mka_psk_set;
|
||||
#endif /* CONFIG_MACSEC */
|
||||
@ -46,7 +46,7 @@
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1012,6 +1013,7 @@ struct hostapd_config {
|
||||
@@ -1050,6 +1051,7 @@ struct hostapd_config {
|
||||
unsigned int airtime_update_interval;
|
||||
#define AIRTIME_MODE_MAX (__AIRTIME_MODE_MAX - 1)
|
||||
#endif /* CONFIG_AIRTIME_POLICY */
|
||||
@ -56,7 +56,7 @@
|
||||
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -206,6 +206,10 @@ static int hostapd_iface_conf_changed(st
|
||||
@@ -216,6 +216,10 @@ static int hostapd_iface_conf_changed(st
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
if (newconf->num_bss != oldconf->num_bss)
|
||||
return 1;
|
||||
|
||||
@@ -219,7 +223,7 @@ static int hostapd_iface_conf_changed(st
|
||||
@@ -229,7 +233,7 @@ static int hostapd_iface_conf_changed(st
|
||||
}
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
{
|
||||
struct hapd_interfaces *interfaces = iface->interfaces;
|
||||
struct hostapd_data *hapd = iface->bss[0];
|
||||
@@ -242,13 +246,16 @@ int hostapd_reload_config(struct hostapd
|
||||
@@ -252,13 +256,16 @@ int hostapd_reload_config(struct hostapd
|
||||
if (newconf == NULL)
|
||||
return -1;
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Configuration changes include interface/BSS modification - force full disable+enable sequence");
|
||||
fname = os_strdup(iface->config_fname);
|
||||
@@ -273,6 +280,22 @@ int hostapd_reload_config(struct hostapd
|
||||
@@ -283,6 +290,24 @@ int hostapd_reload_config(struct hostapd
|
||||
wpa_printf(MSG_ERROR,
|
||||
"Failed to enable interface on config reload");
|
||||
return res;
|
||||
@ -105,7 +105,9 @@
|
||||
+ if (!hapd->config_id || strcmp(hapd->config_id, newconf->bss[j]->config_id)) {
|
||||
+ hostapd_flush_old_stations(iface->bss[j],
|
||||
+ WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||
+#ifdef CONFIG_WEP
|
||||
+ hostapd_broadcast_wep_clear(iface->bss[j]);
|
||||
+#endif
|
||||
+
|
||||
+#ifndef CONFIG_NO_RADIUS
|
||||
+ /* TODO: update dynamic data based on changed configuration
|
||||
@ -118,7 +120,7 @@
|
||||
}
|
||||
iface->conf = newconf;
|
||||
|
||||
@@ -289,6 +312,12 @@ int hostapd_reload_config(struct hostapd
|
||||
@@ -299,6 +324,12 @@ int hostapd_reload_config(struct hostapd
|
||||
|
||||
for (j = 0; j < iface->num_bss; j++) {
|
||||
hapd = iface->bss[j];
|
||||
@ -131,7 +133,7 @@
|
||||
hapd->iconf = newconf;
|
||||
hapd->conf = newconf->bss[j];
|
||||
hostapd_reload_bss(hapd);
|
||||
@@ -2257,6 +2286,10 @@ hostapd_alloc_bss_data(struct hostapd_if
|
||||
@@ -2329,6 +2360,10 @@ hostapd_alloc_bss_data(struct hostapd_if
|
||||
hapd->iconf = conf;
|
||||
hapd->conf = bss;
|
||||
hapd->iface = hapd_iface;
|
||||
@ -144,7 +146,7 @@
|
||||
hapd->ctrl_sock = -1;
|
||||
--- a/src/ap/hostapd.h
|
||||
+++ b/src/ap/hostapd.h
|
||||
@@ -42,7 +42,7 @@ struct mesh_conf;
|
||||
@@ -46,7 +46,7 @@ struct mesh_conf;
|
||||
struct hostapd_iface;
|
||||
|
||||
struct hapd_interfaces {
|
||||
@ -153,7 +155,7 @@
|
||||
struct hostapd_config * (*config_read_cb)(const char *config_fname);
|
||||
int (*ctrl_iface_init)(struct hostapd_data *hapd);
|
||||
void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
|
||||
@@ -148,6 +148,7 @@ struct hostapd_data {
|
||||
@@ -156,6 +156,7 @@ struct hostapd_data {
|
||||
struct hostapd_config *iconf;
|
||||
struct hostapd_bss_config *conf;
|
||||
struct hostapd_ubus_bss ubus;
|
||||
@ -161,7 +163,7 @@
|
||||
int interface_added; /* virtual interface added for this BSS */
|
||||
unsigned int started:1;
|
||||
unsigned int disabled:1;
|
||||
@@ -575,7 +576,7 @@ struct hostapd_iface {
|
||||
@@ -582,7 +583,7 @@ struct hostapd_iface {
|
||||
int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
|
||||
int (*cb)(struct hostapd_iface *iface,
|
||||
void *ctx), void *ctx);
|
||||
@ -172,7 +174,7 @@
|
||||
hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -4295,6 +4295,9 @@ static int wpa_driver_nl80211_set_ap(voi
|
||||
@@ -4486,6 +4486,9 @@ static int wpa_driver_nl80211_set_ap(voi
|
||||
if (ret) {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
|
||||
ret, strerror(-ret));
|
||||
@ -184,7 +186,7 @@
|
||||
nl80211_set_bss(bss, params->cts_protect, params->preamble,
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -182,7 +182,7 @@ static int hostapd_ctrl_iface_update(str
|
||||
@@ -184,7 +184,7 @@ static int hostapd_ctrl_iface_update(str
|
||||
iface->interfaces->config_read_cb = hostapd_ctrl_iface_config_read;
|
||||
reload_opts = txt;
|
||||
|
||||
@ -195,7 +197,7 @@
|
||||
}
|
||||
--- a/hostapd/main.c
|
||||
+++ b/hostapd/main.c
|
||||
@@ -320,7 +320,7 @@ static void handle_term(int sig, void *s
|
||||
@@ -317,7 +317,7 @@ static void handle_term(int sig, void *s
|
||||
|
||||
static int handle_reload_iface(struct hostapd_iface *iface, void *ctx)
|
||||
{
|
||||
@ -206,7 +208,7 @@
|
||||
}
|
||||
--- a/src/ap/wps_hostapd.c
|
||||
+++ b/src/ap/wps_hostapd.c
|
||||
@@ -275,7 +275,7 @@ static void wps_reload_config(void *eloo
|
||||
@@ -315,7 +315,7 @@ static void wps_reload_config(void *eloo
|
||||
|
||||
wpa_printf(MSG_DEBUG, "WPS: Reload configuration data");
|
||||
if (iface->interfaces == NULL ||
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 39042d7f7c4997af55474ebe4513c81f00732837 Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Sat, 24 Aug 2019 15:01:16 -0700
|
||||
Subject: os_sleep: Use nanosleep for POSIX versions 2008 and higher
|
||||
|
||||
uClibc-ng optionally disabled deprecated POSIX functions like usleep,
|
||||
causing compilation failures. This switches to nanosleep while retaining
|
||||
support for older libcs that do not support nanosleep.
|
||||
|
||||
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||
---
|
||||
src/utils/os_internal.c | 6 ++++++
|
||||
src/utils/os_unix.c | 6 ++++++
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
--- a/src/utils/os_internal.c
|
||||
+++ b/src/utils/os_internal.c
|
||||
@@ -25,10 +25,16 @@
|
||||
|
||||
void os_sleep(os_time_t sec, os_time_t usec)
|
||||
{
|
||||
+#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
|
||||
+ const struct timespec req = { sec, usec * 1000 };
|
||||
+
|
||||
+ nanosleep(&req, NULL);
|
||||
+#else
|
||||
if (sec)
|
||||
sleep(sec);
|
||||
if (usec)
|
||||
usleep(usec);
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
--- a/src/utils/os_unix.c
|
||||
+++ b/src/utils/os_unix.c
|
||||
@@ -50,10 +50,16 @@ struct os_alloc_trace {
|
||||
|
||||
void os_sleep(os_time_t sec, os_time_t usec)
|
||||
{
|
||||
+#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200809L)
|
||||
+ const struct timespec req = { sec, usec * 1000 };
|
||||
+
|
||||
+ nanosleep(&req, NULL);
|
||||
+#else
|
||||
if (sec)
|
||||
sleep(sec);
|
||||
if (usec)
|
||||
usleep(usec);
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user