hostapd: update to 2023-06-22
authorAndre Heider <a.heider@gmail.com>
Thu, 6 Jul 2023 06:16:50 +0000 (08:16 +0200)
committerNick Hainke <vincent@systemli.org>
Fri, 7 Jul 2023 12:26:58 +0000 (14:26 +0200)
Removed, merged upstream:
- 170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch

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

Fixes: #12661
Fixes: 304423a4 ("hostapd: update to 2023-03-29")
Signed-off-by: Andre Heider <a.heider@gmail.com>
32 files changed:
package/network/services/hostapd/Makefile
package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch
package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch
package/network/services/hostapd/patches/022-hostapd-fix-use-of-uninitialized-stack-variables.patch
package/network/services/hostapd/patches/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
package/network/services/hostapd/patches/040-mesh-allow-processing-authentication-frames-in-block.patch
package/network/services/hostapd/patches/170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch [deleted file]
package/network/services/hostapd/patches/200-multicall.patch
package/network/services/hostapd/patches/300-noscan.patch
package/network/services/hostapd/patches/301-mesh-noscan.patch
package/network/services/hostapd/patches/310-rescan_immediately.patch
package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch
package/network/services/hostapd/patches/340-reload_freq_change.patch
package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch
package/network/services/hostapd/patches/360-ctrl_iface_reload.patch
package/network/services/hostapd/patches/370-ap_sta_support.patch
package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
package/network/services/hostapd/patches/420-indicate-features.patch
package/network/services/hostapd/patches/450-scan_wait.patch
package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch
package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch
package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch
package/network/services/hostapd/patches/600-ubus_support.patch
package/network/services/hostapd/patches/700-wifi-reload.patch
package/network/services/hostapd/patches/720-iface_max_num_sta.patch
package/network/services/hostapd/patches/730-ft_iface.patch
package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch
package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch
package/network/services/hostapd/patches/760-dynamic_own_ip.patch
package/network/services/hostapd/patches/761-shared_das_port.patch

index dc2967048981246bd04d358d84ec2a857a86cdc6..0fe53dc8d4d6424d72f511bc618c137c3c9c0906 100644 (file)
@@ -9,9 +9,9 @@ PKG_RELEASE:=1.2
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2023-03-29
-PKG_SOURCE_VERSION:=bb945b98fefc64887dffb40773a19d77585cee42
-PKG_MIRROR_HASH:=1da8a39c7c81ce257994874402a86d00080a6145b5eb5c5fc44b2fae1853fe8d
+PKG_SOURCE_DATE:=2023-06-22
+PKG_SOURCE_VERSION:=599d00be9de2846c6ea18c1487d8329522ade22b
+PKG_MIRROR_HASH:=828810c558ea181e45ed0c8b940f5c41e55775e2979a15aed8cf0ab17dd7723c
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
 PKG_LICENSE:=BSD-3-Clause
index 761fe368cd2a9c50b6396216501a957e389ad422..0a51c84d2158b277b52a6a1db2431a6bc089db1c 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
 
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2621,7 +2621,7 @@ static int drv_supports_vht(struct wpa_s
+@@ -2638,7 +2638,7 @@ static int drv_supports_vht(struct wpa_s
  }
  
  
@@ -23,7 +23,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
  {
        int i;
  
-@@ -2630,7 +2630,10 @@ static bool ibss_mesh_is_80mhz_avail(int
+@@ -2647,7 +2647,10 @@ static bool ibss_mesh_is_80mhz_avail(int
  
                chan = hw_get_channel_chan(mode, i, NULL);
                if (!chan ||
@@ -35,7 +35,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
                        return false;
        }
  
-@@ -2757,7 +2760,7 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2774,7 +2777,7 @@ static void ibss_mesh_select_40mhz(struc
                                   const struct wpa_ssid *ssid,
                                   struct hostapd_hw_modes *mode,
                                   struct hostapd_freq_params *freq,
@@ -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;
-@@ -2781,8 +2784,11 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2798,8 +2801,11 @@ static void ibss_mesh_select_40mhz(struc
                return;
  
        /* Check primary channel flags */
@@ -57,7 +57,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
  
  #ifdef CONFIG_HT_OVERRIDES
        if (ssid->disable_ht40)
-@@ -2808,8 +2814,11 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2825,8 +2831,11 @@ static void ibss_mesh_select_40mhz(struc
                return;
  
        /* Check secondary channel flags */
@@ -70,7 +70,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
  
        if (ht40 == -1) {
                if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
-@@ -2863,7 +2872,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2880,7 +2889,7 @@ static bool ibss_mesh_select_80_160mhz(s
                                       const struct wpa_ssid *ssid,
                                       struct hostapd_hw_modes *mode,
                                       struct hostapd_freq_params *freq,
@@ -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,
-@@ -2908,7 +2917,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2925,7 +2934,7 @@ static bool ibss_mesh_select_80_160mhz(s
                goto skip_80mhz;
  
        /* Use 40 MHz if channel not usable */
@@ -88,7 +88,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
                goto skip_80mhz;
  
        chwidth = CONF_OPER_CHWIDTH_80MHZ;
-@@ -2922,7 +2931,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2939,7 +2948,7 @@ static bool ibss_mesh_select_80_160mhz(s
        if ((mode->he_capab[ieee80211_mode].phy_cap[
                     HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &
             HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz &&
@@ -97,7 +97,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
                for (j = 0; j < ARRAY_SIZE(bw160); j++) {
                        if (freq->freq == bw160[j]) {
                                chwidth = CONF_OPER_CHWIDTH_160MHZ;
-@@ -2950,10 +2959,12 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2967,10 +2976,12 @@ static bool ibss_mesh_select_80_160mhz(s
                                if (!chan)
                                        continue;
  
@@ -113,7 +113,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
  
                                /* Found a suitable second segment for 80+80 */
                                chwidth = CONF_OPER_CHWIDTH_80P80MHZ;
-@@ -3008,6 +3019,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3025,6 +3036,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
        int i, obss_scan = 1;
        u8 channel;
        bool is_6ghz;
@@ -121,7 +121,7 @@ Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
  
        freq->freq = ssid->frequency;
  
-@@ -3053,9 +3065,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3070,9 +3082,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
        freq->channel = channel;
        /* Setup higher BW only for 5 GHz */
        if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
index 20a8bee072758f08610a9c687fdb2dc647e33032..9b11f0e80310339462b9ffd100153aa273e5f5ed 100644 (file)
@@ -68,7 +68,7 @@ Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
        if (!chan) {
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -10739,6 +10739,10 @@ static int nl80211_switch_channel(void *
+@@ -10977,6 +10977,10 @@ static int nl80211_switch_channel(void *
        if (ret)
                goto error;
  
index 827e122baf4ea38c45b7e94ede8f5de5cef6a031..4ee43b5186a5d27f42f41cf2ab4276f4c92e4107 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -4168,6 +4168,13 @@ static int add_associated_sta(struct hos
+@@ -4601,6 +4601,13 @@ static int add_associated_sta(struct hos
         * drivers to accept the STA parameter configuration. Since this is
         * after a new FT-over-DS exchange, a new TK has been derived, so key
         * reinstallation is not a concern for this case.
@@ -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)",
-@@ -4181,7 +4188,8 @@ static int add_associated_sta(struct hos
+@@ -4614,7 +4621,8 @@ static int add_associated_sta(struct hos
            (!(sta->flags & WLAN_STA_AUTHORIZED) ||
             (reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
             (!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
index f4f56f5107cf6c3e9e592881da12571c170439c3..8dec325c985bf0b5f506bac56d9a553b979d08a1 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -3562,7 +3562,7 @@ static int hostapd_change_config_freq(st
+@@ -3764,7 +3764,7 @@ static int hostapd_change_config_freq(st
                                      struct hostapd_freq_params *old_params)
  {
        int channel;
index c02d4b497e2aee71ef2beb664948cf081db13436..19248e80d8c975b5f4efe094ca3bec5206665843 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #include <linux/rtnetlink.h>
  #include <netpacket/packet.h>
  #include <linux/errqueue.h>
-@@ -5590,26 +5587,29 @@ fail:
+@@ -5783,26 +5780,29 @@ fail:
  
  static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
  {
@@ -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),
-@@ -5619,9 +5619,8 @@ static void rtnl_neigh_delete_fdb_entry(
+@@ -5812,9 +5812,8 @@ static void rtnl_neigh_delete_fdb_entry(
                           MACSTR, MAC2STR(addr));
        }
  
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
  
  
-@@ -8275,7 +8274,6 @@ static void *i802_init(struct hostapd_da
+@@ -8492,7 +8491,6 @@ static void *i802_init(struct hostapd_da
            (params->num_bridge == 0 || !params->bridge[0]))
                add_ifidx(drv, br_ifindex, drv->ifindex);
  
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (bss->added_if_into_bridge || bss->already_in_bridge) {
                int err;
  
-@@ -8292,7 +8290,6 @@ static void *i802_init(struct hostapd_da
+@@ -8509,7 +8507,6 @@ static void *i802_init(struct hostapd_da
                        goto failed;
                }
        }
@@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
                wpa_printf(MSG_DEBUG,
-@@ -11605,13 +11602,14 @@ static int wpa_driver_br_add_ip_neigh(vo
+@@ -11843,13 +11840,14 @@ static int wpa_driver_br_add_ip_neigh(vo
                                      const u8 *ipaddr, int prefixlen,
                                      const u8 *addr)
  {
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        int res;
  
        if (!ipaddr || prefixlen == 0 || !addr)
-@@ -11630,85 +11628,66 @@ static int wpa_driver_br_add_ip_neigh(vo
+@@ -11868,85 +11866,66 @@ static int wpa_driver_br_add_ip_neigh(vo
        }
  
        if (version == 4) {
@@ -220,7 +220,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                addrsize = 16;
        } else {
                return -EINVAL;
-@@ -11726,41 +11705,30 @@ static int wpa_driver_br_delete_ip_neigh
+@@ -11964,41 +11943,30 @@ static int wpa_driver_br_delete_ip_neigh
                return -1;
        }
  
index 179d47ecc4ed02d4922355b32930339babd28c55..f98d3806dc1689aa453e136a082a6cca9826aeb7 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -2948,15 +2948,6 @@ static void handle_auth(struct hostapd_d
+@@ -3012,15 +3012,6 @@ static void handle_auth(struct hostapd_d
                                       seq_ctrl);
                        return;
                }
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -                  sta->plink_state == PLINK_BLOCKED) {
 -                      wpa_printf(MSG_DEBUG, "Mesh peer " MACSTR
 -                                 " is blocked - drop Authentication frame",
--                                 MAC2STR(mgmt->sa));
+-                                 MAC2STR(sa));
 -                      return;
 -              }
 -#endif /* CONFIG_MESH */
diff --git a/package/network/services/hostapd/patches/170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch b/package/network/services/hostapd/patches/170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch
deleted file mode 100644 (file)
index 7724f1a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From c85ce84d942e1eabde33e120b18e5b1f1637b76e Mon Sep 17 00:00:00 2001
-From: Nick Hainke <vincent@systemli.org>
-Date: Tue, 14 Mar 2023 21:40:53 +0100
-Subject: [PATCH] wpa_supplicant: fix compiling without IEEE8021X_EAPOL
-
-If IEEE8021X_EAPOL is not defined wpa_supplicant will not compile with
-following error:
-
-  events.c: In function 'wpa_supplicant_connect':
-  events.c:1827:14: warning: implicit declaration of function 'eap_is_wps_pbc_enrollee' [-Wimplicit-function-declaration]
-   1827 |         if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
-        |              ^~~~~~~~~~~~~~~~~~~~~~~
-  events.c:1827:43: error: 'struct wpa_ssid' has no member named 'eap'
-   1827 |         if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
-        |                                           ^~
-
-Adding ifdef statements around the calling function fixes the issue.
-
-Signed-off-by: Nick Hainke <vincent@systemli.org>
----
- wpa_supplicant/events.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/wpa_supplicant/events.c
-+++ b/wpa_supplicant/events.c
-@@ -1824,6 +1824,7 @@ int wpa_supplicant_connect(struct wpa_su
-                          struct wpa_bss *selected,
-                          struct wpa_ssid *ssid)
- {
-+#ifdef IEEE8021X_EAPOL
-       if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
-            wpas_wps_partner_link_overlap_detect(wpa_s)) ||
-           wpas_wps_scan_pbc_overlap(wpa_s, selected, ssid)) {
-@@ -1846,6 +1847,7 @@ int wpa_supplicant_connect(struct wpa_su
- #endif /* CONFIG_WPS */
-               return -1;
-       }
-+#endif /* IEEE8021X_EAPOL */
-       wpa_msg(wpa_s, MSG_DEBUG,
-               "Considering connect request: reassociate: %d  selected: "
index f12aeb0ca9e37aa5ae70482147e06edcc0e7d530..f7e797a9c800ec58258cc1e538870c742358cb75 100644 (file)
  wpa_cli.exe: wpa_cli
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -6544,8 +6544,8 @@ union wpa_event_data {
+@@ -6651,8 +6651,8 @@ union wpa_event_data {
   * Driver wrapper code should call this function whenever an event is received
   * from the driver.
   */
  
  /**
   * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
-@@ -6557,7 +6557,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -6664,7 +6664,7 @@ void wpa_supplicant_event(void *ctx, enu
   * Same as wpa_supplicant_event(), but we search for the interface in
   * wpa_global.
   */
  /*
 --- a/src/ap/drv_callbacks.c
 +++ b/src/ap/drv_callbacks.c
-@@ -1887,8 +1887,8 @@ err:
+@@ -1994,8 +1994,8 @@ err:
  #endif /* CONFIG_OWE */
  
  
  {
        struct hostapd_data *hapd = ctx;
  #ifndef CONFIG_NO_STDOUT_DEBUG
-@@ -2161,7 +2161,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -2271,7 +2271,7 @@ void wpa_supplicant_event(void *ctx, enu
  }
  
  
        os_memset(&global, 0, sizeof(global));
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -5237,8 +5237,8 @@ static void wpas_event_unprot_beacon(str
+@@ -5345,8 +5345,8 @@ static void wpas_link_reconfig(struct wp
  }
  
  
  {
        struct wpa_supplicant *wpa_s = ctx;
        int resched;
-@@ -6149,7 +6149,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -6264,7 +6264,7 @@ void wpa_supplicant_event(void *ctx, enu
  }
  
  
        struct wpa_supplicant *wpa_s;
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -7408,7 +7408,6 @@ struct wpa_interface * wpa_supplicant_ma
+@@ -7435,7 +7435,6 @@ struct wpa_interface * wpa_supplicant_ma
        return NULL;
  }
  
  /**
   * wpa_supplicant_match_existing - Match existing interfaces
   * @global: Pointer to global data from wpa_supplicant_init()
-@@ -7443,6 +7442,11 @@ static int wpa_supplicant_match_existing
+@@ -7470,6 +7469,11 @@ static int wpa_supplicant_match_existing
  
  #endif /* CONFIG_MATCH_IFACE */
  
  
  /**
   * wpa_supplicant_add_iface - Add a new network interface
-@@ -7699,6 +7703,8 @@ struct wpa_global * wpa_supplicant_init(
+@@ -7726,6 +7730,8 @@ struct wpa_global * wpa_supplicant_init(
  #ifndef CONFIG_NO_WPA_MSG
        wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
  #endif /* CONFIG_NO_WPA_MSG */
                wpa_debug_open_file(params->wpa_debug_file_path);
 --- a/hostapd/main.c
 +++ b/hostapd/main.c
-@@ -595,6 +595,11 @@ fail:
+@@ -685,6 +685,11 @@ fail:
        return -1;
  }
  
  
  #ifdef CONFIG_WPS
  static int gen_uuid(const char *txt_addr)
-@@ -688,6 +693,8 @@ int main(int argc, char *argv[])
+@@ -778,6 +783,8 @@ int main(int argc, char *argv[])
                return -1;
  #endif /* CONFIG_DPP */
  
index 91e1aaad8333a5c54889d659d8b19691467c8b8d..c6f9eba9d53863428a22e0181400e3fa4b97ea81 100644 (file)
@@ -13,7 +13,7 @@
        } else if (os_strcmp(buf, "ht_capab") == 0) {
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1061,6 +1061,8 @@ struct hostapd_config {
+@@ -1072,6 +1072,8 @@ struct hostapd_config {
  
        int ht_op_mode_fixed;
        u16 ht_capab;
index 8a1bdaa1854a72a3fef61bd3775d74ac5fe50829..6b5416f0ea57ec73b85d7bd6d8cc17fc3465be8f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/config.c
 +++ b/wpa_supplicant/config.c
-@@ -2599,6 +2599,7 @@ static const struct parse_data ssid_fiel
+@@ -2600,6 +2600,7 @@ static const struct parse_data ssid_fiel
  #else /* CONFIG_MESH */
        { INT_RANGE(mode, 0, 4) },
  #endif /* CONFIG_MESH */
@@ -31,7 +31,7 @@
                /*
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2693,7 +2693,7 @@ static bool ibss_mesh_can_use_vht(struct
+@@ -2710,7 +2710,7 @@ static bool ibss_mesh_can_use_vht(struct
                                  const struct wpa_ssid *ssid,
                                  struct hostapd_hw_modes *mode)
  {
@@ -40,7 +40,7 @@
                return false;
  
        if (!drv_supports_vht(wpa_s, ssid))
-@@ -2766,7 +2766,7 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2783,7 +2783,7 @@ static void ibss_mesh_select_40mhz(struc
        int i, res;
        unsigned int j;
        static const int ht40plus[] = {
@@ -49,7 +49,7 @@
                184, 192
        };
        int ht40 = -1;
-@@ -3016,7 +3016,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3033,7 +3033,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
        int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
        enum hostapd_hw_mode hw_mode;
        struct hostapd_hw_modes *mode = NULL;
index 033f763094d5c259d4cc4eee85c9a3cf3d58808e..a47546d38fc2f90b648368b15540a190e6626bc2 100644 (file)
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -5713,7 +5713,7 @@ wpa_supplicant_alloc(struct wpa_supplica
+@@ -5740,7 +5740,7 @@ wpa_supplicant_alloc(struct wpa_supplica
        if (wpa_s == NULL)
                return NULL;
        wpa_s->scan_req = INITIAL_SCAN_REQ;
index 93a03a6db670b4d0cc4ee35693d41ca9dc7b08e3..c11c9572169ffec9793e7a68b55fd28065897bb0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -5224,7 +5224,7 @@ static int nl80211_set_channel(struct i8
+@@ -5407,7 +5407,7 @@ static int nl80211_set_channel(struct i8
                   freq->he_enabled, freq->eht_enabled, freq->bandwidth,
                   freq->center_freq1, freq->center_freq2);
  
index 9a468079d1a54ab2d7e63ae99e92ae7a42fc1dba..ae6cd81ea4d8011526ab0755800e6ddc0e950d94 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -142,6 +142,29 @@ static void hostapd_reload_bss(struct ho
+@@ -143,6 +143,29 @@ static void hostapd_reload_bss(struct ho
  #endif /* CONFIG_NO_RADIUS */
  
        ssid = &hapd->conf->ssid;
@@ -30,7 +30,7 @@
        if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
            ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
                /*
-@@ -250,6 +273,7 @@ int hostapd_reload_config(struct hostapd
+@@ -251,6 +274,7 @@ int hostapd_reload_config(struct hostapd
        struct hostapd_data *hapd = iface->bss[0];
        struct hostapd_config *newconf, *oldconf;
        size_t j;
@@ -38,7 +38,7 @@
  
        if (iface->config_fname == NULL) {
                /* Only in-memory config in use - assume it has been updated */
-@@ -300,6 +324,17 @@ int hostapd_reload_config(struct hostapd
+@@ -301,6 +325,17 @@ int hostapd_reload_config(struct hostapd
        }
        iface->conf = newconf;
  
@@ -56,7 +56,7 @@
        for (j = 0; j < iface->num_bss; j++) {
                hapd = iface->bss[j];
                if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
-@@ -307,21 +342,6 @@ int hostapd_reload_config(struct hostapd
+@@ -308,21 +343,6 @@ int hostapd_reload_config(struct hostapd
                              newconf->bss[j]->config_id) != 0)
                        hostapd_clear_old_bss(hapd);
                hapd->iconf = newconf;
index a943395b5640abce3c71dab717afa33387be2c13..647ca2cbf9751ef4b6ba09fe0e6dd806837611fd 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -3006,12 +3006,12 @@ static int wpa_driver_nl80211_del_beacon
+@@ -3008,12 +3008,12 @@ static int wpa_driver_nl80211_del_beacon
                return 0;
  
        wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
@@ -15,7 +15,7 @@
        if (!msg)
                return -ENOBUFS;
  
-@@ -5907,7 +5907,7 @@ static void nl80211_teardown_ap(struct i
+@@ -6100,7 +6100,7 @@ static void nl80211_teardown_ap(struct i
                nl80211_mgmt_unsubscribe(bss, "AP teardown");
  
        nl80211_put_wiphy_data_ap(bss);
@@ -24,7 +24,7 @@
  }
  
  
-@@ -8642,8 +8642,6 @@ static int wpa_driver_nl80211_if_remove(
+@@ -8859,8 +8859,6 @@ static int wpa_driver_nl80211_if_remove(
        } else {
                wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
                nl80211_teardown_ap(bss);
index e9f46ce9d36f32c9cc2b4ebb2258297e3b4d46ff..4d85ea11f906b88d93616e1a56cf9194da2c74b9 100644 (file)
@@ -78,7 +78,7 @@
  
  #ifdef NEED_AP_MLME
  static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd,
-@@ -3529,6 +3586,8 @@ static int hostapd_ctrl_iface_receive_pr
+@@ -3564,6 +3621,8 @@ static int hostapd_ctrl_iface_receive_pr
        } else if (os_strncmp(buf, "VENDOR ", 7) == 0) {
                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
-@@ -1008,7 +1008,13 @@ int hostapd_parse_csa_settings(const cha
+@@ -1023,7 +1023,13 @@ int hostapd_parse_csa_settings(const cha
  
  int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
  {
index 24064839f13e315cd6440a7ce94f2802031616de..3baad2a52e5008303ce32892ad73aee033a14752 100644 (file)
                wpa_s->new_connection = 1;
                wpa_drv_set_operstate(wpa_s, 0);
  #ifndef IEEE8021X_EAPOL
-@@ -2520,6 +2572,8 @@ void wpa_supplicant_associate(struct wpa
+@@ -2537,6 +2589,8 @@ void wpa_supplicant_associate(struct wpa
                        return;
                }
                wpa_s->current_bss = bss;
  #else /* CONFIG_MESH */
                wpa_msg(wpa_s, MSG_ERROR,
                        "mesh mode support not included in the build");
-@@ -7010,6 +7064,16 @@ static int wpa_supplicant_init_iface(str
+@@ -7037,6 +7091,16 @@ static int wpa_supplicant_init_iface(str
                           sizeof(wpa_s->bridge_ifname));
        }
  
        /* RSNA Supplicant Key Management - INITIALIZE */
        eapol_sm_notify_portEnabled(wpa_s->eapol, false);
        eapol_sm_notify_portValid(wpa_s->eapol, false);
-@@ -7352,6 +7416,11 @@ static void wpa_supplicant_deinit_iface(
+@@ -7379,6 +7443,11 @@ static void wpa_supplicant_deinit_iface(
        if (terminate)
                wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
  
  
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -2716,6 +2716,12 @@ static int hostapd_ctrl_iface_chan_switc
+@@ -2751,6 +2751,12 @@ static int hostapd_ctrl_iface_chan_switc
                return 0;
        }
  
                /* Save CHAN_SWITCH VHT, HE, and EHT config */
 --- a/src/ap/beacon.c
 +++ b/src/ap/beacon.c
-@@ -2052,11 +2052,6 @@ static int __ieee802_11_set_beacon(struc
+@@ -2108,11 +2108,6 @@ static int __ieee802_11_set_beacon(struc
                return -1;
        }
  
        if (ieee802_11_build_ap_params(hapd, &params) < 0)
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -5237,6 +5237,60 @@ static void wpas_event_unprot_beacon(str
+@@ -5345,6 +5345,60 @@ static void wpas_link_reconfig(struct wp
  }
  
  
  void supplicant_event(void *ctx, enum wpa_event_type event,
                      union wpa_event_data *data)
  {
-@@ -5586,8 +5640,10 @@ void supplicant_event(void *ctx, enum wp
+@@ -5697,8 +5751,10 @@ void supplicant_event(void *ctx, enum wp
                        channel_width_to_string(data->ch_switch.ch_width),
                        data->ch_switch.cf1,
                        data->ch_switch.cf2);
                wpa_s->current_ssid->frequency = data->ch_switch.freq;
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -6324,6 +6324,7 @@ union wpa_event_data {
+@@ -6421,6 +6421,7 @@ union wpa_event_data {
  
        /**
         * struct ch_switch
         * @freq: Frequency of new channel in MHz
         * @ht_enabled: Whether this is an HT channel
         * @ch_offset: Secondary channel offset
-@@ -6334,6 +6335,7 @@ union wpa_event_data {
+@@ -6431,6 +6432,7 @@ union wpa_event_data {
         * @punct_bitmap: Puncturing bitmap
         */
        struct ch_switch {
                int ch_offset;
 --- a/src/drivers/driver_nl80211_event.c
 +++ b/src/drivers/driver_nl80211_event.c
-@@ -997,6 +997,7 @@ static void mlme_event_ch_switch(struct
+@@ -1202,6 +1202,7 @@ static void mlme_event_ch_switch(struct
                                 struct nlattr *bw, struct nlattr *cf1,
                                 struct nlattr *cf2,
                                 struct nlattr *punct_bitmap,
                                 int finished)
  {
        struct i802_bss *bss;
-@@ -1060,6 +1061,8 @@ static void mlme_event_ch_switch(struct
+@@ -1265,6 +1266,8 @@ static void mlme_event_ch_switch(struct
                data.ch_switch.cf1 = nla_get_u32(cf1);
        if (cf2)
                data.ch_switch.cf2 = nla_get_u32(cf2);
  
        if (finished)
                bss->flink->freq = data.ch_switch.freq;
-@@ -3604,6 +3607,7 @@ static void do_process_drv_event(struct
+@@ -3848,6 +3851,7 @@ static void do_process_drv_event(struct
                                     tb[NL80211_ATTR_CENTER_FREQ1],
                                     tb[NL80211_ATTR_CENTER_FREQ2],
                                     tb[NL80211_ATTR_PUNCT_BITMAP],
                                     0);
                break;
        case NL80211_CMD_CH_SWITCH_NOTIFY:
-@@ -3616,6 +3620,7 @@ static void do_process_drv_event(struct
+@@ -3860,6 +3864,7 @@ static void do_process_drv_event(struct
                                     tb[NL80211_ATTR_CENTER_FREQ1],
                                     tb[NL80211_ATTR_CENTER_FREQ2],
                                     tb[NL80211_ATTR_PUNCT_BITMAP],
index b886ab74927402f175cf3aa48d0eeea7c40264ae..456599db09217bee3a071b6902af2abd60f9ba8b 100644 (file)
@@ -12,7 +12,7 @@
  else
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -3342,6 +3342,7 @@ static int hostapd_ctrl_iface_receive_pr
+@@ -3377,6 +3377,7 @@ static int hostapd_ctrl_iface_receive_pr
                                                      reply_size);
        } 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) {
-@@ -3383,6 +3384,7 @@ static int hostapd_ctrl_iface_receive_pr
+@@ -3418,6 +3419,7 @@ static int hostapd_ctrl_iface_receive_pr
        } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
                reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
                                                        reply_size);
                if (os_snprintf_error(buflen - len, ret))
 --- a/src/ap/ieee802_1x.c
 +++ b/src/ap/ieee802_1x.c
-@@ -2753,6 +2753,7 @@ static const char * bool_txt(bool val)
+@@ -2834,6 +2834,7 @@ static const char * bool_txt(bool val)
        return val ? "TRUE" : "FALSE";
  }
  
  
  int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
  {
-@@ -2939,6 +2940,7 @@ int ieee802_1x_get_mib_sta(struct hostap
+@@ -3020,6 +3021,7 @@ int ieee802_1x_get_mib_sta(struct hostap
        return len;
  }
  
  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
-@@ -4786,6 +4786,7 @@ static const char * wpa_bool_txt(int val
+@@ -5328,6 +5328,7 @@ static const char * wpa_bool_txt(int val
        return val ? "TRUE" : "FALSE";
  }
  
  
  #define RSN_SUITE "%02x-%02x-%02x-%d"
  #define RSN_SUITE_ARG(s) \
-@@ -4938,7 +4939,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
+@@ -5480,7 +5481,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
  
        return len;
  }
index 356d5f8c6814e6579972f664c3025278a70cd8ab..786b83d3151d649e2243623476fb578781f1c5e9 100644 (file)
@@ -9,7 +9,7 @@
  
  struct hapd_global {
        void **drv_priv;
-@@ -696,7 +696,7 @@ int main(int argc, char *argv[])
+@@ -786,7 +786,7 @@ int main(int argc, char *argv[])
        wpa_supplicant_event = hostapd_wpa_event;
        wpa_supplicant_event_global = hostapd_wpa_event_global;
        for (;;) {
@@ -18,7 +18,7 @@
                if (c < 0)
                        break;
                switch (c) {
-@@ -733,6 +733,8 @@ int main(int argc, char *argv[])
+@@ -823,6 +823,8 @@ int main(int argc, char *argv[])
                        break;
  #endif /* CONFIG_DEBUG_LINUX_TRACING */
                case 'v':
index e265d1ac7ca9f0f191c09a93dd7d2f1100339527..45886896ee9b3021c68d98b0cadc6072719b58a8 100644 (file)
  
  /**
   * hostapd_driver_init - Preparate driver interface
-@@ -164,6 +174,8 @@ static int hostapd_driver_init(struct ho
-               return -1;
+@@ -217,6 +227,8 @@ static int hostapd_driver_init(struct ho
        }
+ #endif /* CONFIG_IEEE80211BE */
  
 +      hapd->setup_complete_cb = hostapd_setup_complete_cb;
 +
        /* 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
+@@ -497,8 +509,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
+@@ -524,18 +534,6 @@ static int hostapd_global_run(struct hap
        }
  #endif /* EAP_SERVER_TNC */
  
@@ -61,7 +61,7 @@
        eloop_run();
  
        return 0;
-@@ -649,8 +647,7 @@ int main(int argc, char *argv[])
+@@ -739,8 +737,7 @@ int main(int argc, char *argv[])
        struct hapd_interfaces interfaces;
        int ret = 1;
        size_t i, j;
index 80987774597e6f38dc18b83c1f21721dc1a1d618..4c728681393cd7ed2c56f91f1deea92b1611869b 100644 (file)
@@ -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"
-@@ -936,6 +937,9 @@ struct wpa_driver_associate_params {
+@@ -953,6 +954,9 @@ struct wpa_driver_associate_params {
         * responsible for selecting with which BSS to associate. */
        const u8 *bssid;
  
@@ -140,7 +140,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
  /* Helper macros for network block parser */
  
  #ifdef OFFSET
-@@ -2673,6 +2765,8 @@ static const struct parse_data ssid_fiel
+@@ -2674,6 +2766,8 @@ static const struct parse_data ssid_fiel
        { INT(ap_max_inactivity) },
        { INT(dtim_period) },
        { INT(beacon_int) },
@@ -174,7 +174,7 @@ 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
-@@ -4177,6 +4177,12 @@ static void wpas_start_assoc_cb(struct w
+@@ -4203,6 +4203,12 @@ static void wpas_start_assoc_cb(struct w
                        params.beacon_int = ssid->beacon_int;
                else
                        params.beacon_int = wpa_s->conf->beacon_int;
index e738ea131641a646351efe2f73f16e02f14f3ea2..be9e0507d6daf3ddf533c37663a07dd0f8426b56 100644 (file)
@@ -19,7 +19,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
 
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -1768,6 +1768,7 @@ struct wpa_driver_mesh_join_params {
+@@ -1827,6 +1827,7 @@ struct wpa_driver_mesh_join_params {
  #define WPA_DRIVER_MESH_FLAG_AMPE     0x00000008
        unsigned int flags;
        bool handle_dfs;
@@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
  struct wpa_driver_set_key_params {
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -11388,6 +11388,18 @@ static int nl80211_put_mesh_id(struct nl
+@@ -11626,6 +11626,18 @@ static int nl80211_put_mesh_id(struct nl
  }
  
  
@@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
  static int nl80211_put_mesh_config(struct nl_msg *msg,
                                   struct wpa_driver_mesh_bss_params *params)
  {
-@@ -11449,6 +11461,7 @@ static int nl80211_join_mesh(struct i802
+@@ -11687,6 +11699,7 @@ static int nl80211_join_mesh(struct i802
            nl80211_put_basic_rates(msg, params->basic_rates) ||
            nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
            nl80211_put_beacon_int(msg, params->beacon_int) ||
index 73ccc65ad985ec8263883e59e55d395cdea50d3c..c7e8cf25ce8fd930c6aba4e2ce3b357bc62a00c5 100644 (file)
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -3077,6 +3077,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3094,6 +3094,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
  
        freq->freq = ssid->frequency;
  
index a6f43171ccddc39f51771cdf9bf0a38472342153..0efa6db9085f2bfa80b3b26be60912d4ec83ad22 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/ap/hostapd.h
 +++ b/src/ap/hostapd.h
-@@ -162,6 +162,21 @@ struct hostapd_sae_commit_queue {
+@@ -163,6 +163,21 @@ struct hostapd_sae_commit_queue {
  };
  
  /**
@@ -22,9 +22,9 @@
   * struct hostapd_data - hostapd per-BSS data structure
   */
  struct hostapd_data {
-@@ -175,6 +190,9 @@ struct hostapd_data {
+@@ -182,6 +197,9 @@ struct hostapd_data {
  
-       u8 own_addr[ETH_ALEN];
+       struct hostapd_data *mld_first_bss;
  
 +      /* OpenWrt specific statistics */
 +      struct hostapd_openwrt_stats openwrt_stats;
index aa68079fb266832e4a1f3e9d2061079374610d90..f3936342a5f1180d84adbfe5441a36eb90e8e6ea 100644 (file)
@@ -31,7 +31,7 @@
  };
  
  enum hostapd_chan_status {
-@@ -183,6 +184,7 @@ struct hostapd_data {
+@@ -184,6 +185,7 @@ struct hostapd_data {
        struct hostapd_iface *iface;
        struct hostapd_config *iconf;
        struct hostapd_bss_config *conf;
@@ -39,7 +39,7 @@
        int interface_added; /* virtual interface added for this BSS */
        unsigned int started:1;
        unsigned int disabled:1;
-@@ -682,6 +684,7 @@ hostapd_alloc_bss_data(struct hostapd_if
+@@ -695,6 +697,7 @@ hostapd_alloc_bss_data(struct hostapd_if
                       struct hostapd_bss_config *bss);
  int hostapd_setup_interface(struct hostapd_iface *iface);
  int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
@@ -49,7 +49,7 @@
  struct hostapd_iface * hostapd_alloc_iface(void);
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -435,6 +435,7 @@ void hostapd_free_hapd_data(struct hosta
+@@ -455,6 +455,7 @@ void hostapd_free_hapd_data(struct hosta
        hapd->beacon_set_done = 0;
  
        wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
@@ -57,7 +57,7 @@
        accounting_deinit(hapd);
        hostapd_deinit_wpa(hapd);
        vlan_deinit(hapd);
-@@ -1185,6 +1186,8 @@ static int hostapd_start_beacon(struct h
+@@ -1207,6 +1208,8 @@ static int hostapd_start_beacon(struct h
        if (hapd->driver && hapd->driver->set_operstate)
                hapd->driver->set_operstate(hapd->drv_priv, 1);
  
@@ -66,7 +66,7 @@
        return 0;
  }
  
-@@ -2126,6 +2129,7 @@ static int hostapd_setup_interface_compl
+@@ -2295,6 +2298,7 @@ static int hostapd_setup_interface_compl
        if (err)
                goto fail;
  
        wpa_printf(MSG_DEBUG, "Completing interface initialization");
        if (iface->freq) {
  #ifdef NEED_AP_MLME
-@@ -2342,6 +2346,7 @@ dfs_offload:
+@@ -2514,6 +2518,7 @@ dfs_offload:
  
  fail:
        wpa_printf(MSG_ERROR, "Interface initialization failed");
 +      hostapd_ubus_free_iface(iface);
-       hostapd_set_state(iface, HAPD_IFACE_DISABLED);
-       wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
- #ifdef CONFIG_FST
-@@ -2817,6 +2822,7 @@ void hostapd_interface_deinit_free(struc
+       if (iface->is_no_ir) {
+               hostapd_set_state(iface, HAPD_IFACE_NO_IR);
+@@ -3004,6 +3009,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;
@@ -92,7 +92,7 @@
                   __func__, driver, drv_priv);
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -2740,13 +2740,18 @@ static void handle_auth(struct hostapd_d
+@@ -2778,7 +2778,7 @@ static void handle_auth(struct hostapd_d
        u16 auth_alg, auth_transaction, status_code;
        u16 resp = WLAN_STATUS_SUCCESS;
        struct sta_info *sta = NULL;
        u16 fc;
        const u8 *challenge = NULL;
        u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN];
-       size_t resp_ies_len = 0;
-       u16 seq_ctrl;
+@@ -2787,6 +2787,11 @@ static void handle_auth(struct hostapd_d
        struct radius_sta rad_info;
+       const u8 *dst, *sa, *bssid;
+       bool mld_sta = false;
 +      struct hostapd_ubus_request req = {
 +              .type = HOSTAPD_UBUS_AUTH_REQ,
 +              .mgmt_frame = mgmt,
  
        if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
                wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
-@@ -2914,6 +2919,13 @@ static void handle_auth(struct hostapd_d
+@@ -2978,6 +2983,13 @@ static void handle_auth(struct hostapd_d
                resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
                goto fail;
        }
        if (res == HOSTAPD_ACL_PENDING)
                return;
  
-@@ -4695,7 +4707,7 @@ static void handle_assoc(struct hostapd_
+@@ -5141,7 +5153,7 @@ static void handle_assoc(struct hostapd_
        int resp = WLAN_STATUS_SUCCESS;
        u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE;
        const u8 *pos;
        struct sta_info *sta;
        u8 *tmp = NULL;
  #ifdef CONFIG_FILS
-@@ -4908,6 +4920,11 @@ static void handle_assoc(struct hostapd_
+@@ -5354,6 +5366,11 @@ static void handle_assoc(struct hostapd_
                left = res;
        }
  #endif /* CONFIG_FILS */
  
        /* followed by SSID and Supported rates; and HT capabilities if 802.11n
         * is used */
-@@ -5006,6 +5023,13 @@ static void handle_assoc(struct hostapd_
+@@ -5452,6 +5469,13 @@ static void handle_assoc(struct hostapd_
        }
  #endif /* CONFIG_FILS */
  
   fail:
  
        /*
-@@ -5099,6 +5123,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));
+@@ -5733,6 +5757,7 @@ static void handle_disassoc(struct hosta
+                          (unsigned long) len);
+               return;
+       }
 +      hostapd_ubus_notify(hapd, "disassoc", mgmt->sa);
  
        sta = ap_get_sta(hapd, mgmt->sa);
-       if (sta == NULL) {
-@@ -5168,6 +5193,8 @@ static void handle_deauth(struct hostapd
+       if (!sta) {
+@@ -5764,6 +5789,8 @@ static void handle_deauth(struct hostapd
        /* Clear the PTKSA cache entries for PASN */
        ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE);
  
 +      hostapd_ubus_notify(hapd, "deauth", mgmt->sa);
 +
        sta = ap_get_sta(hapd, mgmt->sa);
-       if (sta == NULL) {
-               wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying "
+       if (!sta) {
+               wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR
 --- a/src/ap/beacon.c
 +++ b/src/ap/beacon.c
-@@ -1006,6 +1006,12 @@ void handle_probe_req(struct hostapd_dat
+@@ -1036,6 +1036,12 @@ void handle_probe_req(struct hostapd_dat
        u16 csa_offs[2];
        size_t csa_offs_len;
        struct radius_sta rad_info;
  
        if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
            ssi_signal < hapd->iconf->rssi_ignore_probe_request)
-@@ -1192,6 +1198,12 @@ void handle_probe_req(struct hostapd_dat
+@@ -1222,6 +1228,12 @@ void handle_probe_req(struct hostapd_dat
        }
  #endif /* CONFIG_P2P */
  
                wpabuf_free(sta->p2p_ie);
 --- a/src/ap/sta_info.c
 +++ b/src/ap/sta_info.c
-@@ -460,6 +460,7 @@ void ap_handle_timer(void *eloop_ctx, vo
+@@ -471,6 +471,7 @@ void ap_handle_timer(void *eloop_ctx, vo
                hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
                               HOSTAPD_LEVEL_INFO, "deauthenticated due to "
                               "local deauth request");
                ap_free_sta(hapd, sta);
                return;
        }
-@@ -615,6 +616,7 @@ skip_poll:
+@@ -626,6 +627,7 @@ skip_poll:
                mlme_deauthenticate_indication(
                        hapd, sta,
                        WLAN_REASON_PREV_AUTH_NOT_VALID);
                ap_free_sta(hapd, sta);
                break;
        }
-@@ -1305,15 +1307,28 @@ void ap_sta_set_authorized(struct hostap
+@@ -1344,15 +1346,28 @@ void ap_sta_set_authorized(struct hostap
                                        sta->addr, authorized, dev_addr);
  
        if (authorized) {
  #ifdef CONFIG_P2P
                if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
                        os_snprintf(ip_addr, sizeof(ip_addr),
-@@ -1323,6 +1338,13 @@ void ap_sta_set_authorized(struct hostap
+@@ -1362,6 +1377,13 @@ void ap_sta_set_authorized(struct hostap
                }
  #endif /* CONFIG_P2P */
  
                keyid = ap_sta_wpa_get_keyid(hapd, sta);
                if (keyid) {
                        os_snprintf(keyid_buf, sizeof(keyid_buf),
-@@ -1341,17 +1363,19 @@ void ap_sta_set_authorized(struct hostap
+@@ -1380,17 +1402,19 @@ void ap_sta_set_authorized(struct hostap
                                         dpp_pkhash, SHA256_MAC_LEN);
                }
  
  CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -7608,6 +7608,8 @@ struct wpa_supplicant * wpa_supplicant_a
+@@ -7635,6 +7635,8 @@ struct wpa_supplicant * wpa_supplicant_a
        }
  #endif /* CONFIG_P2P */
  
        return wpa_s;
  }
  
-@@ -7634,6 +7636,8 @@ int wpa_supplicant_remove_iface(struct w
+@@ -7661,6 +7663,8 @@ int wpa_supplicant_remove_iface(struct w
        struct wpa_supplicant *parent = wpa_s->parent;
  #endif /* CONFIG_MESH */
  
        /* Remove interface from the global list of interfaces */
        prev = global->ifaces;
        if (prev == wpa_s) {
-@@ -7980,8 +7984,12 @@ int wpa_supplicant_run(struct wpa_global
+@@ -8007,8 +8011,12 @@ int wpa_supplicant_run(struct wpa_global
        eloop_register_signal_terminate(wpa_supplicant_terminate, global);
        eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
  
  
 --- a/hostapd/main.c
 +++ b/hostapd/main.c
-@@ -901,6 +901,7 @@ int main(int argc, char *argv[])
+@@ -991,6 +991,7 @@ int main(int argc, char *argv[])
        }
  
        hostapd_global_ctrl_iface_init(&interfaces);
  
        if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
                wpa_printf(MSG_ERROR, "Failed to start eloop");
-@@ -910,6 +911,7 @@ int main(int argc, char *argv[])
+@@ -1000,6 +1001,7 @@ int main(int argc, char *argv[])
        ret = 0;
  
   out:
        }
 --- a/src/ap/sta_info.h
 +++ b/src/ap/sta_info.h
-@@ -293,6 +293,7 @@ struct sta_info {
+@@ -322,6 +322,7 @@ struct sta_info {
  #endif /* CONFIG_TESTING_OPTIONS */
  #ifdef CONFIG_AIRTIME_POLICY
        unsigned int airtime_weight;
index 5ac7f711a5cdeed38aa3ea2cec38dd6377417da0..e0da149c443d9e8184ffba626cdc434d771e21c8 100644 (file)
@@ -20,7 +20,7 @@
        } else if (os_strcmp(buf, "channel") == 0) {
 --- a/src/ap/ap_config.c
 +++ b/src/ap/ap_config.c
-@@ -997,6 +997,7 @@ void hostapd_config_free(struct hostapd_
+@@ -998,6 +998,7 @@ void hostapd_config_free(struct hostapd_
  
        for (i = 0; i < conf->num_bss; i++)
                hostapd_config_free_bss(conf->bss[i]);
@@ -30,7 +30,7 @@
        os_free(conf->basic_rates);
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -987,6 +987,7 @@ struct eht_phy_capabilities_info {
+@@ -998,6 +998,7 @@ struct eht_phy_capabilities_info {
  struct hostapd_config {
        struct hostapd_bss_config **bss, *last_bss;
        size_t num_bss;
@@ -40,7 +40,7 @@
        int rts_threshold;
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -254,6 +254,10 @@ static int hostapd_iface_conf_changed(st
+@@ -255,6 +255,10 @@ static int hostapd_iface_conf_changed(st
  {
        size_t i;
  
@@ -51,7 +51,7 @@
        if (newconf->num_bss != oldconf->num_bss)
                return 1;
  
-@@ -267,7 +271,7 @@ static int hostapd_iface_conf_changed(st
+@@ -268,7 +272,7 @@ static int hostapd_iface_conf_changed(st
  }
  
  
@@ -60,7 +60,7 @@
  {
        struct hapd_interfaces *interfaces = iface->interfaces;
        struct hostapd_data *hapd = iface->bss[0];
-@@ -295,6 +299,9 @@ int hostapd_reload_config(struct hostapd
+@@ -296,6 +300,9 @@ int hostapd_reload_config(struct hostapd
                char *fname;
                int res;
  
@@ -70,7 +70,7 @@
                hostapd_clear_old(iface);
  
                wpa_printf(MSG_DEBUG,
-@@ -321,6 +328,24 @@ int hostapd_reload_config(struct hostapd
+@@ -322,6 +329,24 @@ int hostapd_reload_config(struct hostapd
                        wpa_printf(MSG_ERROR,
                                   "Failed to enable interface on config reload");
                return res;
@@ -95,7 +95,7 @@
        }
        iface->conf = newconf;
  
-@@ -337,6 +362,12 @@ int hostapd_reload_config(struct hostapd
+@@ -338,6 +363,12 @@ int hostapd_reload_config(struct hostapd
  
        for (j = 0; j < iface->num_bss; j++) {
                hapd = iface->bss[j];
                if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
                    os_strcmp(hapd->conf->config_id,
                              newconf->bss[j]->config_id) != 0)
-@@ -2514,6 +2545,10 @@ hostapd_alloc_bss_data(struct hostapd_if
+@@ -2700,6 +2731,10 @@ hostapd_alloc_bss_data(struct hostapd_if
        hapd->iconf = conf;
        hapd->conf = bss;
        hapd->iface = hapd_iface;
        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);
-@@ -185,6 +185,7 @@ struct hostapd_data {
+@@ -186,6 +186,7 @@ struct hostapd_data {
        struct hostapd_config *iconf;
        struct hostapd_bss_config *conf;
        struct hostapd_ubus_bss ubus;
        int interface_added; /* virtual interface added for this BSS */
        unsigned int started:1;
        unsigned int disabled:1;
-@@ -676,7 +677,7 @@ struct hostapd_iface {
+@@ -689,7 +690,7 @@ struct hostapd_iface {
  int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
                               int (*cb)(struct hostapd_iface *iface,
                                         void *ctx), void *ctx);
  hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -5054,6 +5054,9 @@ static int wpa_driver_nl80211_set_ap(voi
+@@ -5322,6 +5322,9 @@ static int wpa_driver_nl80211_set_ap(voi
        if (ret) {
                wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)",
                           ret, strerror(-ret));
 +                      ret = 0;
 +              bss->flink->beacon_set = 0;
        } else {
-               bss->flink->beacon_set = 1;
+               link->beacon_set = 1;
                nl80211_set_bss(bss, params->cts_protect, params->preamble,
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
  }
 --- a/hostapd/main.c
 +++ b/hostapd/main.c
-@@ -320,7 +320,7 @@ static void handle_term(int sig, void *s
+@@ -410,7 +410,7 @@ static void handle_term(int sig, void *s
  
  static int handle_reload_iface(struct hostapd_iface *iface, void *ctx)
  {
index a06f141c83fcc8c59fe8a8648d7727444c3b5d1a..bf7e8e7617541df6683b6bbb057d604f49dd1aa5 100644 (file)
@@ -17,7 +17,7 @@
        } else if (os_strcmp(buf, "extended_key_id") == 0) {
 --- a/src/ap/hostapd.h
 +++ b/src/ap/hostapd.h
-@@ -721,6 +721,7 @@ void hostapd_cleanup_cs_params(struct ho
+@@ -734,6 +734,7 @@ void hostapd_cleanup_cs_params(struct ho
  void hostapd_periodic_iface(struct hostapd_iface *iface);
  int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
  void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
@@ -27,7 +27,7 @@
  void hostapd_cleanup_cca_params(struct hostapd_data *hapd);
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -271,6 +271,30 @@ static int hostapd_iface_conf_changed(st
+@@ -272,6 +272,30 @@ static int hostapd_iface_conf_changed(st
  }
  
  
@@ -60,7 +60,7 @@
        struct hapd_interfaces *interfaces = iface->interfaces;
 --- a/src/ap/beacon.c
 +++ b/src/ap/beacon.c
-@@ -1222,7 +1222,7 @@ void handle_probe_req(struct hostapd_dat
+@@ -1252,7 +1252,7 @@ void handle_probe_req(struct hostapd_dat
        if (hapd->conf->no_probe_resp_if_max_sta &&
            is_multicast_ether_addr(mgmt->da) &&
            is_multicast_ether_addr(mgmt->bssid) &&
@@ -71,7 +71,7 @@
                           " since no room for additional STA",
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1026,6 +1026,8 @@ struct hostapd_config {
+@@ -1037,6 +1037,8 @@ struct hostapd_config {
        unsigned int track_sta_max_num;
        unsigned int track_sta_max_age;
  
index 1826c97623622b6c01a289692a8d4fce8b27a6c4..0795ed15a1402ba94bac1f46b7a0592a39f06e20 100644 (file)
@@ -21,7 +21,7 @@
        int bridge_hairpin; /* hairpin_mode on bridge members */
 --- a/src/ap/wpa_auth_glue.c
 +++ b/src/ap/wpa_auth_glue.c
-@@ -1616,8 +1616,12 @@ int hostapd_setup_wpa(struct hostapd_dat
+@@ -1727,8 +1727,12 @@ int hostapd_setup_wpa(struct hostapd_dat
            wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
                const char *ft_iface;
  
index c3a77bc6537b2a1b9b6e8162a690e2e768615cc8..e06e36c37d1988e1e75c0704740a17e1052dbfc1 100644 (file)
@@ -32,7 +32,7 @@
                os_free(bss->dump_msk_file);
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -1499,6 +1499,7 @@ static int hostapd_setup_bss(struct host
+@@ -1534,6 +1534,7 @@ static int hostapd_setup_bss(struct host
                wpa_printf(MSG_ERROR, "GAS server initialization failed");
                return -1;
        }
@@ -40,7 +40,7 @@
  
        if (conf->qos_map_set_len &&
            hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
-@@ -1506,7 +1507,6 @@ static int hostapd_setup_bss(struct host
+@@ -1541,7 +1542,6 @@ static int hostapd_setup_bss(struct host
                wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
                return -1;
        }
@@ -50,7 +50,7 @@
                wpa_printf(MSG_ERROR, "BSS Load initialization failed");
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -2672,8 +2672,6 @@ void wnm_bss_keep_alive_deinit(struct wp
+@@ -2683,8 +2683,6 @@ void wnm_bss_keep_alive_deinit(struct wp
  }
  
  
@@ -59,7 +59,7 @@
  static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map,
                            size_t len)
  {
-@@ -2706,8 +2704,6 @@ static void interworking_process_assoc_r
+@@ -2717,8 +2715,6 @@ static void interworking_process_assoc_r
        }
  }
  
@@ -68,7 +68,7 @@
  
  static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s)
  {
-@@ -3087,10 +3083,8 @@ static int wpa_supplicant_event_associnf
+@@ -3098,10 +3094,8 @@ static int wpa_supplicant_event_associnf
                wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
                                       data->assoc_info.resp_ies_len);
  #endif /* CONFIG_WNM */
index 1fc4e8a77cf2f6f785096cf863ec3d0ac8083096..f5ebab70d1db365bee3ae6431885b77478402fd5 100644 (file)
@@ -1,6 +1,6 @@
 --- a/src/ap/ap_drv_ops.c
 +++ b/src/ap/ap_drv_ops.c
-@@ -874,7 +874,8 @@ int hostapd_start_dfs_cac(struct hostapd
+@@ -927,7 +927,8 @@ int hostapd_start_dfs_cac(struct hostapd
  int hostapd_drv_set_qos_map(struct hostapd_data *hapd,
                            const u8 *qos_map_set, u8 qos_map_set_len)
  {
index 2f5015892b7b46567fbb1a0ec655a6b668b36635..2c705a68cf0acf4b5b2415a41f61d05262d2b4d1 100644 (file)
@@ -85,7 +85,7 @@
                       RadiusType msg_type, const u8 *addr);
 --- a/src/ap/ieee802_1x.c
 +++ b/src/ap/ieee802_1x.c
-@@ -535,6 +535,10 @@ int add_common_radius_attr(struct hostap
+@@ -598,6 +598,10 @@ int add_common_radius_attr(struct hostap
        struct hostapd_radius_attr *attr;
        int len;
  
index 59c2a967953d5e00982a54b9716ac3d3fb322a5d..dad7afddf13b66c8d645720ab9781a9bb6866623 100644 (file)
        unsigned int time_window;
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -1442,6 +1442,7 @@ static int hostapd_setup_bss(struct host
-               struct radius_das_conf das_conf;
-               os_memset(&das_conf, 0, sizeof(das_conf));
-               das_conf.port = conf->radius_das_port;
-+              das_conf.nas_identifier = conf->nas_identifier;
-               das_conf.shared_secret = conf->radius_das_shared_secret;
-               das_conf.shared_secret_len =
-                       conf->radius_das_shared_secret_len;
+@@ -1471,6 +1471,7 @@ static int hostapd_setup_bss(struct host
+                       os_memset(&das_conf, 0, sizeof(das_conf));
+                       das_conf.port = conf->radius_das_port;
++                      das_conf.nas_identifier = conf->nas_identifier;
+                       das_conf.shared_secret = conf->radius_das_shared_secret;
+                       das_conf.shared_secret_len =
+                               conf->radius_das_shared_secret_len;
 --- a/src/radius/radius_das.c
 +++ b/src/radius/radius_das.c
 @@ -12,13 +12,26 @@