Skip to content

Commit

Permalink
hostapd: bump to 2024-03-09
Browse files Browse the repository at this point in the history
This brings many changes, including fixes for a couple of memory leaks,
and improved interoperability with 802.11r.  There are also many changes
related to 802.11be, which is not enabled at this time.

Fixed upstream:
 - 022-hostapd-fix-use-of-uninitialized-stack-variables.patch
 - 180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch
 - 993-2023-10-28-ACS-Fix-typo-in-bw_40-frequency-array.patch

Switch PKG_SOURCE_URL to https, since http is not currently working.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Tested-by: Ilya Katsnelson <me@0upti.me>
Tested by: Andrew Sim <andrewsimz@gmail.com>
  • Loading branch information
cotequeiroz authored and nbd168 committed Apr 4, 2024
1 parent 89c594e commit 24d0e74
Show file tree
Hide file tree
Showing 55 changed files with 477 additions and 518 deletions.
10 changes: 5 additions & 5 deletions package/network/services/hostapd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=hostapd
PKG_RELEASE:=6
PKG_RELEASE:=1

PKG_SOURCE_URL:=http://w1.fi/hostap.git
PKG_SOURCE_URL:=https://w1.fi/hostap.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2023-09-08
PKG_SOURCE_VERSION:=e5ccbfc69ecf297590341ae8b461edba9d8e964c
PKG_MIRROR_HASH:=8be806f6c88e736fff920e0d3e2cde7188fbf640fef47e9aeaad504674bfc0f3
PKG_SOURCE_DATE:=2024-03-09
PKG_SOURCE_VERSION:=695277a5b3da08b9a8a4e7117b933deb8b4950a7
PKG_MIRROR_HASH:=8d6cb89be101bb3dcd84e7eb29484111dfeeeadf49eae85594b08011ba0ed62e

PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=BSD-3-Clause
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ 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 | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
wpa_supplicant/wpa_supplicant.c | 38 ++++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 13 deletions(-)

--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2638,7 +2638,7 @@ static int drv_supports_vht(struct wpa_s
@@ -2698,7 +2698,7 @@ static int drv_supports_vht(struct wpa_s
}


Expand All @@ -23,7 +23,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
{
int i;

@@ -2647,7 +2647,10 @@ static bool ibss_mesh_is_80mhz_avail(int
@@ -2707,7 +2707,10 @@ static bool ibss_mesh_is_80mhz_avail(int

chan = hw_get_channel_chan(mode, i, NULL);
if (!chan ||
Expand All @@ -35,7 +35,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
return false;
}

@@ -2774,7 +2777,7 @@ static void ibss_mesh_select_40mhz(struc
@@ -2834,7 +2837,7 @@ static void ibss_mesh_select_40mhz(struc
const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode,
struct hostapd_freq_params *freq,
Expand All @@ -44,7 +44,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
int chan_idx;
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
int i, res;
@@ -2798,8 +2801,11 @@ static void ibss_mesh_select_40mhz(struc
@@ -2858,8 +2861,11 @@ static void ibss_mesh_select_40mhz(struc
return;

/* Check primary channel flags */
Expand All @@ -57,7 +57,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>

#ifdef CONFIG_HT_OVERRIDES
if (ssid->disable_ht40)
@@ -2825,8 +2831,11 @@ static void ibss_mesh_select_40mhz(struc
@@ -2885,8 +2891,11 @@ static void ibss_mesh_select_40mhz(struc
return;

/* Check secondary channel flags */
Expand All @@ -70,7 +70,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>

if (ht40 == -1) {
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
@@ -2880,7 +2889,7 @@ static bool ibss_mesh_select_80_160mhz(s
@@ -2940,7 +2949,7 @@ static bool ibss_mesh_select_80_160mhz(s
const struct wpa_ssid *ssid,
struct hostapd_hw_modes *mode,
struct hostapd_freq_params *freq,
Expand All @@ -79,7 +79,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
static const int bw80[] = {
5180, 5260, 5500, 5580, 5660, 5745, 5825,
5955, 6035, 6115, 6195, 6275, 6355, 6435,
@@ -2925,7 +2934,7 @@ static bool ibss_mesh_select_80_160mhz(s
@@ -2985,7 +2994,7 @@ static bool ibss_mesh_select_80_160mhz(s
goto skip_80mhz;

/* Use 40 MHz if channel not usable */
Expand All @@ -88,7 +88,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
goto skip_80mhz;

chwidth = CONF_OPER_CHWIDTH_80MHZ;
@@ -2939,7 +2948,7 @@ static bool ibss_mesh_select_80_160mhz(s
@@ -2999,7 +3008,7 @@ static bool ibss_mesh_select_80_160mhz(s
if ((mode->he_capab[ieee80211_mode].phy_cap[
HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &
HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz &&
Expand All @@ -97,7 +97,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
for (j = 0; j < ARRAY_SIZE(bw160); j++) {
if (freq->freq == bw160[j]) {
chwidth = CONF_OPER_CHWIDTH_160MHZ;
@@ -2967,10 +2976,12 @@ static bool ibss_mesh_select_80_160mhz(s
@@ -3027,10 +3036,12 @@ static bool ibss_mesh_select_80_160mhz(s
if (!chan)
continue;

Expand All @@ -113,15 +113,15 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>

/* Found a suitable second segment for 80+80 */
chwidth = CONF_OPER_CHWIDTH_80P80MHZ;
@@ -3025,6 +3036,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
@@ -3085,6 +3096,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
int i, obss_scan = 1;
u8 channel;
bool is_6ghz;
bool is_6ghz, is_24ghz;
+ bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);

freq->freq = ssid->frequency;

@@ -3070,9 +3082,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
@@ -3133,9 +3145,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
freq->channel = channel;
/* Setup higher BW only for 5 GHz */
if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
return NULL;
+
chan_idx = _rand % num_available_chandefs;
dfs_find_channel(iface, &chan, chan_idx, type);
if (!chan) {
wpa_printf(MSG_DEBUG, "DFS: Picked random entry from the list: %d/%d",
chan_idx, num_available_chandefs);
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -11017,6 +11017,10 @@ static int nl80211_switch_channel(void *
@@ -11195,6 +11195,10 @@ static int nl80211_switch_channel(void *
if (ret)
goto error;

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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -16,9 +16,6 @@
#include <net/if.h>
@@ -18,9 +18,6 @@
#include <netlink/genl/genl.h>
#include <netlink/genl/ctrl.h>
#include <netlink/genl/family.h>
-#ifdef CONFIG_LIBNL3_ROUTE
-#include <netlink/route/neighbour.h>
-#endif /* CONFIG_LIBNL3_ROUTE */
#include <linux/rtnetlink.h>
#include <netpacket/packet.h>
#include <linux/errqueue.h>
@@ -5783,26 +5780,29 @@ fail:
@@ -5859,26 +5856,29 @@ fail:

static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
{
Expand Down Expand Up @@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (err < 0) {
wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
@@ -5812,9 +5812,8 @@ static void rtnl_neigh_delete_fdb_entry(
@@ -5888,9 +5888,8 @@ static void rtnl_neigh_delete_fdb_entry(
MACSTR, MAC2STR(addr));
}

Expand All @@ -76,23 +76,23 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}


@@ -8492,7 +8491,6 @@ static void *i802_init(struct hostapd_da
@@ -8615,7 +8614,6 @@ static void *i802_init(struct hostapd_da
(params->num_bridge == 0 || !params->bridge[0]))
add_ifidx(drv, br_ifindex, drv->ifindex);

-#ifdef CONFIG_LIBNL3_ROUTE
if (bss->added_if_into_bridge || bss->already_in_bridge) {
int err;

@@ -8509,7 +8507,6 @@ static void *i802_init(struct hostapd_da
@@ -8632,7 +8630,6 @@ static void *i802_init(struct hostapd_da
goto failed;
}
}
-#endif /* CONFIG_LIBNL3_ROUTE */

if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
wpa_printf(MSG_DEBUG,
@@ -11883,13 +11880,14 @@ static int wpa_driver_br_add_ip_neigh(vo
@@ -12071,13 +12068,14 @@ static int wpa_driver_br_add_ip_neigh(vo
const u8 *ipaddr, int prefixlen,
const u8 *addr)
{
Expand All @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int res;

if (!ipaddr || prefixlen == 0 || !addr)
@@ -11908,85 +11906,66 @@ static int wpa_driver_br_add_ip_neigh(vo
@@ -12096,85 +12094,66 @@ static int wpa_driver_br_add_ip_neigh(vo
}

if (version == 4) {
Expand Down Expand Up @@ -220,7 +220,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
addrsize = 16;
} else {
return -EINVAL;
@@ -12004,41 +11983,30 @@ static int wpa_driver_br_delete_ip_neigh
@@ -12192,41 +12171,30 @@ static int wpa_driver_br_delete_ip_neigh
return -1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -3020,15 +3020,6 @@ static void handle_auth(struct hostapd_d
@@ -3032,15 +3032,6 @@ static void handle_auth(struct hostapd_d
seq_ctrl);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions package/network/services/hostapd/patches/050-build_fix.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -324,6 +324,7 @@ ifdef CONFIG_FILS
@@ -326,6 +326,7 @@ ifdef CONFIG_FILS
CFLAGS += -DCONFIG_FILS
OBJS += ../src/ap/fils_hlp.o
NEED_SHA384=y
Expand All @@ -10,7 +10,7 @@
CFLAGS += -DCONFIG_FILS_SK_PFS
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -331,6 +331,7 @@ endif
@@ -334,6 +334,7 @@ endif
ifdef CONFIG_FILS
CFLAGS += -DCONFIG_FILS
NEED_SHA384=y
Expand Down
Loading

0 comments on commit 24d0e74

Please sign in to comment.