Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package iwd for openSUSE:Factory checked in 
at 2023-06-20 16:48:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/iwd (Old)
 and      /work/SRC/openSUSE:Factory/.iwd.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "iwd"

Tue Jun 20 16:48:41 2023 rev:38 rq:1093836 version:2.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/iwd/iwd.changes  2023-05-18 15:20:09.594161191 
+0200
+++ /work/SRC/openSUSE:Factory/.iwd.new.15902/iwd.changes       2023-06-20 
16:48:49.823531632 +0200
@@ -1,0 +2,10 @@
+Mon Jun 19 19:50:19 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 2.5:
+  * Fix issue with HT40+/- checks when creating chandef.
+  * Fix issue with handling support for FT-8021X-SHA384.
+  * Fix issue with handling secure bit check in handshake 1/4.
+  * Fix issue with allowing roaming before netconfig finishes.
+  * Fix issue with double free when disconnecting during FT.
+
+-------------------------------------------------------------------

Old:
----
  iwd-2.4.tar.sign
  iwd-2.4.tar.xz

New:
----
  iwd-2.5.tar.sign
  iwd-2.5.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ iwd.spec ++++++
--- /var/tmp/diff_new_pack.1hnEex/_old  2023-06-20 16:48:50.595536271 +0200
+++ /var/tmp/diff_new_pack.1hnEex/_new  2023-06-20 16:48:50.595536271 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           iwd
-Version:        2.4
+Version:        2.5
 Release:        0
 Summary:        Wireless daemon for Linux
 License:        LGPL-2.1-or-later

++++++ iwd-2.4.tar.xz -> iwd-2.5.tar.xz ++++++
++++ 2228 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/AUTHORS new/iwd-2.5/AUTHORS
--- old/iwd-2.4/AUTHORS 2023-03-27 17:38:25.000000000 +0200
+++ new/iwd-2.5/AUTHORS 2023-05-24 17:38:48.000000000 +0200
@@ -40,3 +40,4 @@
 Pinghao Wu <xdavidw...@gmail.com>
 Neehar Vijay <env252...@gmail.com>
 Jiajie Chen <c...@jia.je>
+Ronan Pigott <ro...@rjp.ie>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/ChangeLog new/iwd-2.5/ChangeLog
--- old/iwd-2.4/ChangeLog       2023-03-27 17:38:25.000000000 +0200
+++ new/iwd-2.5/ChangeLog       2023-05-24 17:38:48.000000000 +0200
@@ -1,3 +1,10 @@
+ver 2.5:
+       Fix issue with HT40+/- checks when creating chandef.
+       Fix issue with handling support for FT-8021X-SHA384.
+       Fix issue with handling secure bit check in handshake 1/4.
+       Fix issue with allowing roaming before netconfig finishes.
+       Fix issue with double free when disconnecting during FT.
+
 ver 2.4:
        Fix issue with FT-over-Air and same channel operation.
        Fix issue with AP mode and missing support for GTK.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/Makefile.am new/iwd-2.5/Makefile.am
--- old/iwd-2.4/Makefile.am     2022-11-18 13:31:49.000000000 +0100
+++ new/iwd-2.5/Makefile.am     2023-05-24 17:38:48.000000000 +0200
@@ -150,6 +150,14 @@
 ell_libell_internal_la_SOURCES = $(ell_headers) $(ell_sources) $(ell_shared)
 endif
 
+if LIBEDIT
+client_cflags = $(LIBEDIT_CFLAGS)
+client_ldadd = $(LIBEDIT_LIBS)
+else
+client_cflags =
+client_ldadd = $(READLINE_LIBS)
+endif
+
 bin_PROGRAMS =
 libexec_PROGRAMS =
 noinst_PROGRAMS =
@@ -308,7 +316,7 @@
                        src/util.c src/util.h \
                        src/band.c src/band.h
 
-client_iwctl_LDADD = $(ell_ldadd) $(READLINE_LIBS)
+client_iwctl_LDADD = $(ell_ldadd) $(client_ldadd)
 
 if MANUAL_PAGES
 man_MANS += client/iwctl.1
@@ -368,6 +376,7 @@
 endif
 endif
 
+if DAEMON
 noinst_PROGRAMS += tools/probe-req tools/iwd-decrypt-profile
 
 tools_probe_req_SOURCES = tools/probe-req.c src/mpdu.h src/mpdu.c \
@@ -383,6 +392,7 @@
                                        src/crypto.h src/crypto.c \
                                        src/storage.h src/storage.c
 tools_iwd_decrypt_profile_LDADD = ${ell_ldadd}
+endif
 
 if HWSIM
 bin_PROGRAMS += tools/hwsim
@@ -406,7 +416,10 @@
 endif
 endif
 
-unit_tests = unit/test-cmac-aes \
+unit_tests =
+
+if DAEMON
+unit_tests += unit/test-cmac-aes \
                unit/test-hmac-md5 unit/test-hmac-sha1 unit/test-hmac-sha256 \
                unit/test-prf-sha1 unit/test-kdf-sha256 \
                unit/test-crypto unit/test-eapol unit/test-mpdu \
@@ -414,6 +427,7 @@
                unit/test-arc4 unit/test-wsc unit/test-eap-mschapv2 \
                unit/test-eap-sim unit/test-sae unit/test-p2p unit/test-band \
                unit/test-dpp unit/test-json
+endif
 
 if CLIENT
 unit_tests += unit/test-client
@@ -423,6 +437,7 @@
 noinst_PROGRAMS += $(unit_tests)
 endif
 
+if DAEMON
 unit_test_eap_sim_SOURCES = unit/test-eap-sim.c \
                src/crypto.h src/crypto.c src/simutil.h src/simutil.c \
                src/ie.h src/ie.c \
@@ -436,7 +451,6 @@
                src/erp.h src/erp.c \
                src/band.h src/band.c \
                src/eap-sim.c
-
 unit_test_eap_sim_LDADD = $(ell_ldadd)
 
 unit_test_cmac_aes_SOURCES = unit/test-cmac-aes.c \
@@ -445,7 +459,6 @@
 
 unit_test_arc4_SOURCES = unit/test-arc4.c \
                                        src/crypto.h src/crypto.c
-
 unit_test_arc4_LDADD = $(ell_ldadd)
 
 unit_test_hmac_md5_SOURCES = unit/test-hmac-md5.c \
@@ -534,19 +547,6 @@
                                unit/test-eap-mschapv2.c
 unit_test_eap_mschapv2_LDADD = $(ell_ldadd)
 
-if CLIENT
-unit_test_client_SOURCES = unit/test-client.c \
-                               client/adapter.c \
-                               client/agent.h client/agent.c \
-                               client/agent-manager.h client/agent-manager.c \
-                               client/command.h client/command.c \
-                               client/dbus-proxy.h client/dbus-proxy.c \
-                               client/display.h client/display.c \
-                               client/network.h client/network.c \
-                               client/properties.h client/properties.c
-unit_test_client_LDADD = $(ell_ldadd) $(READLINE_LIBS)
-endif
-
 unit_test_sae_SOURCES = unit/test-sae.c \
                                src/sae.h src/sae.c \
                                src/crypto.h src/crypto.c \
@@ -575,6 +575,20 @@
 
 unit_test_json_SOURCES = unit/test-json.c src/json.h src/json.c shared/jsmn.h
 unit_test_json_LDADD = $(ell_ldadd)
+endif
+
+if CLIENT
+unit_test_client_SOURCES = unit/test-client.c \
+                               client/adapter.c \
+                               client/agent.h client/agent.c \
+                               client/agent-manager.h client/agent-manager.c \
+                               client/command.h client/command.c \
+                               client/dbus-proxy.h client/dbus-proxy.c \
+                               client/display.h client/display.c \
+                               client/network.h client/network.c \
+                               client/properties.h client/properties.c
+unit_test_client_LDADD = $(ell_ldadd) $(client_ldadd)
+endif
 
 TESTS = $(unit_tests)
 
@@ -586,7 +600,7 @@
                                        $(patsubst %.5,%.rst, \
                                        $(patsubst %.8,%.rst,$(manual_pages))))
 
-AM_CFLAGS = $(ell_cflags) -fvisibility=hidden \
+AM_CFLAGS = $(ell_cflags) $(client_cflags) -fvisibility=hidden \
                                -DUNITDIR=\""$(top_srcdir)/unit/"\" \
                                -DCERTDIR=\""$(top_builddir)/unit/"\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/acinclude.m4 new/iwd-2.5/acinclude.m4
--- old/iwd-2.4/acinclude.m4    2022-07-15 19:08:06.000000000 +0200
+++ new/iwd-2.5/acinclude.m4    2023-05-24 17:38:48.000000000 +0200
@@ -58,7 +58,6 @@
                CFLAGS+=" -Wdeclaration-after-statement"
                CFLAGS+=" -Wmissing-declarations"
                CFLAGS+=" -Wredundant-decls"
-               CFALGS+=" -Wvariadic-macros"
                CFLAGS+=" -Wformat -Wformat-security"
                if ( $CC -v 2>/dev/null | grep "gcc version" ); then
                        CFLAGS+=" -Wcast-align"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/client/display.c new/iwd-2.5/client/display.c
--- old/iwd-2.4/client/display.c        2022-11-18 13:31:49.000000000 +0100
+++ new/iwd-2.5/client/display.c        2023-05-24 17:38:48.000000000 +0200
@@ -890,7 +890,8 @@
 
 void display_quit(void)
 {
-       rl_crlf();
+       if (command_is_interactive_mode())
+               rl_crlf();
 }
 
 static void window_change_signal_handler(void *user_data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/client/known-networks.c new/iwd-2.5/client/known-networks.c
--- old/iwd-2.4/client/known-networks.c 2022-09-07 20:42:27.000000000 +0200
+++ new/iwd-2.5/client/known-networks.c 2023-05-24 17:38:48.000000000 +0200
@@ -24,8 +24,7 @@
 #include <config.h>
 #endif
 
-#define _XOPEN_SOURCE 700
-
+#define _XOPEN_SOURCE
 #include <time.h>
 #include <ell/ell.h>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/config.h.in new/iwd-2.5/config.h.in
--- old/iwd-2.4/config.h.in     2023-03-27 17:40:10.000000000 +0200
+++ new/iwd-2.5/config.h.in     2023-05-24 17:40:46.000000000 +0200
@@ -36,9 +36,6 @@
 /* Define to 1 if you have the `rawmemchr' function. */
 #undef HAVE_RAWMEMCHR
 
-/* Define to 1 if you have the <readline/readline.h> header file. */
-#undef HAVE_READLINE_READLINE_H
-
 /* Define to 1 if you have the `reallocarray' function. */
 #undef HAVE_REALLOCARRAY
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/configure.ac new/iwd-2.5/configure.ac
--- old/iwd-2.4/configure.ac    2023-03-27 17:38:25.000000000 +0200
+++ new/iwd-2.5/configure.ac    2023-05-24 17:38:48.000000000 +0200
@@ -1,5 +1,5 @@
 AC_PREREQ([2.69])
-AC_INIT([iwd],[2.4])
+AC_INIT([iwd],[2.5])
 
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_AUX_DIR(build-aux)
@@ -153,11 +153,17 @@
                                [don't install iwctl client utility]),
                                        [enable_client=${enableval}])
 if (test "${enable_client}" != "no"); then
-       AC_CHECK_HEADERS(readline/readline.h, enable_readline=yes,
-                       AC_MSG_ERROR(readline header files are required))
-       PKG_CHECK_MODULES(READLINE, readline, dummy=yes, 
READLINE_LIBS=-lreadline)
-       AC_SUBST(READLINE_CFLAGS)
-       AC_SUBST(READLINE_LIBS)
+       if (test "${enable_libedit}" = "yes"); then
+               PKG_CHECK_MODULES(LIBEDIT, libedit >= 3.1, dummy=yes,
+                               AC_MSG_ERROR(Editline library is required))
+               AC_SUBST(LIBEDIT_CFLAGS)
+               AC_SUBST(LIBEDIT_LIBS)
+       else
+               PKG_CHECK_MODULES(READLINE, readline, dummy=yes,
+                               AC_MSG_ERROR(Readline library is required))
+               AC_SUBST(READLINE_CFLAGS)
+               AC_SUBST(READLINE_LIBS)
+       fi
 fi
 AM_CONDITIONAL(CLIENT, test "${enable_client}" != "no")
 
@@ -263,7 +269,7 @@
                        test "${enable_monitor}" != "no" ||
                        test "${enable_wired}" = "yes" ||
                        test "${enable_hwsim}" = "yes"); then
-               ell_min_version="0.56"
+               ell_min_version="0.57"
        else
                ell_min_version="0.5"
        fi
@@ -274,6 +280,10 @@
 fi
 AM_CONDITIONAL(EXTERNAL_ELL, test "${enable_external_ell}" = "yes")
 
+AC_ARG_ENABLE([libedit], AS_HELP_STRING([--enable-libedit],
+                               [enable Editline library instead of Readline]),
+                                       [enable_libedit=${enableval}])
+AM_CONDITIONAL(LIBEDIT, test "${enable_libedit}" = "yes")
 
 AC_ARG_ENABLE([wired], AS_HELP_STRING([--enable-wired],
                                [enable Ethernet authentication support]),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/ell/cert.c new/iwd-2.5/ell/cert.c
--- old/iwd-2.4/ell/cert.c      2022-11-18 10:08:38.000000000 +0100
+++ new/iwd-2.5/ell/cert.c      2023-05-24 16:13:48.000000000 +0200
@@ -67,7 +67,7 @@
        struct l_cert *issuer;
        struct l_cert *issued;
        size_t asn1_len;
-       uint8_t asn1[0];
+       uint8_t asn1[];
 };
 
 struct l_certchain {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/ell/cipher.c new/iwd-2.5/ell/cipher.c
--- old/iwd-2.4/ell/cipher.c    2021-09-14 21:48:51.000000000 +0200
+++ new/iwd-2.5/ell/cipher.c    2023-05-24 16:13:48.000000000 +0200
@@ -338,9 +338,14 @@
 
                iov[0].iov_base = (void *) ad;
                iov[0].iov_len = ad_len;
-               iov[1].iov_base = (void *) in;
-               iov[1].iov_len = in_len;
-               msg.msg_iovlen = 2;
+
+               msg.msg_iovlen = 1;
+
+               if (in) {
+                       iov[1].iov_base = (void *) in;
+                       iov[1].iov_len = in_len;
+                       msg.msg_iovlen = 2;
+               }
        } else {
                iov[0].iov_base = (void *) in;
                iov[0].iov_len = in_len;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/ell/dhcp-private.h new/iwd-2.5/ell/dhcp-private.h
--- old/iwd-2.4/ell/dhcp-private.h      2022-04-21 16:47:16.000000000 +0200
+++ new/iwd-2.5/ell/dhcp-private.h      2023-05-24 16:13:48.000000000 +0200
@@ -87,7 +87,7 @@
        uint8_t sname[64];
        uint8_t file[128];
        __be32 magic;
-       uint8_t options[0];
+       uint8_t options[];
 } __attribute__ ((packed));
 
 struct dhcp_message_iter {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/ell/genl.c new/iwd-2.5/ell/genl.c
--- old/iwd-2.4/ell/genl.c      2022-09-07 20:21:45.000000000 +0200
+++ new/iwd-2.5/ell/genl.c      2023-05-24 16:13:48.000000000 +0200
@@ -1910,11 +1910,23 @@
        if (request)
                goto done;
 
-       request = l_queue_remove_if(genl->pending_list, match_request_id,
+       request = l_queue_find(genl->pending_list, match_request_id,
                                                        L_UINT_TO_PTR(id));
        if (!request)
                return false;
 
+       /*
+        * A message in-flight still needs to wait for NLMSG_DONE so clean up
+        * for the caller but keep the request queued until its done.
+        */
+       if (request->destroy)
+               request->destroy(request->user_data);
+
+       request->callback = NULL;
+       request->destroy = NULL;
+
+       return true;
+
 done:
        destroy_request(request);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/ell/settings.c new/iwd-2.5/ell/settings.c
--- old/iwd-2.4/ell/settings.c  2022-02-24 21:20:21.000000000 +0100
+++ new/iwd-2.5/ell/settings.c  2023-05-24 16:13:48.000000000 +0200
@@ -61,7 +61,7 @@
        char *name;
        char type[32];
        size_t len;
-       char data[0];
+       char data[];
 };
 
 struct group_data {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/linux/nl80211.h new/iwd-2.5/linux/nl80211.h
--- old/iwd-2.4/linux/nl80211.h 2022-11-18 13:31:49.000000000 +0100
+++ new/iwd-2.5/linux/nl80211.h 2023-05-24 17:38:48.000000000 +0200
@@ -424,7 +424,8 @@
  *     interface identified by %NL80211_ATTR_IFINDEX.
  * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC
  *     or, if no MAC address given, all stations, on the interface identified
- *     by %NL80211_ATTR_IFINDEX. %NL80211_ATTR_MGMT_SUBTYPE and
+ *     by %NL80211_ATTR_IFINDEX. For MLD station, MLD address is used in
+ *     %NL80211_ATTR_MAC. %NL80211_ATTR_MGMT_SUBTYPE and
  *     %NL80211_ATTR_REASON_CODE can optionally be used to specify which type
  *     of disconnection indication should be sent to the station
  *     (Deauthentication or Disassociation frame and reason code for that
@@ -1166,6 +1167,23 @@
  *     %NL80211_ATTR_STATUS_CODE attribute in %NL80211_CMD_EXTERNAL_AUTH
  *     command interface.
  *
+ *     Host driver sends MLD address of the AP with %NL80211_ATTR_MLD_ADDR in
+ *     %NL80211_CMD_EXTERNAL_AUTH event to indicate user space to enable MLO
+ *     during the authentication offload in STA mode while connecting to MLD
+ *     APs. Host driver should check %NL80211_ATTR_MLO_SUPPORT flag capability
+ *     in %NL80211_CMD_CONNECT to know whether the user space supports enabling
+ *     MLO during the authentication offload or not.
+ *     User space should enable MLO during the authentication only when it
+ *     receives the AP MLD address in authentication offload request. User
+ *     space shouldn't enable MLO when the authentication offload request
+ *     doesn't indicate the AP MLD address even if the AP is MLO capable.
+ *     User space should use %NL80211_ATTR_MLD_ADDR as peer's MLD address and
+ *     interface address identified by %NL80211_ATTR_IFINDEX as self MLD
+ *     address. User space and host driver to use MLD addresses in RA, TA and
+ *     BSSID fields of the frames between them, and host driver translates the
+ *     MLD addresses to/from link addresses based on the link chosen for the
+ *     authentication.
+ *
  *     Host driver reports this status on an authentication failure to the
  *     user space through the connect result as the user space would have
  *     initiated the connection through the connect request.
@@ -2749,6 +2767,14 @@
  *     When used with %NL80211_CMD_FRAME_TX_STATUS, indicates the ack RX
  *     timestamp. When used with %NL80211_CMD_FRAME RX notification, indicates
  *     the incoming frame RX timestamp.
+ * @NL80211_ATTR_TD_BITMAP: Transition Disable bitmap, for subsequent
+ *     (re)associations.
+ *
+ * @NL80211_ATTR_PUNCT_BITMAP: (u32) Preamble puncturing bitmap, lowest
+ *     bit corresponds to the lowest 20 MHz channel. Each bit set to 1
+ *     indicates that the sub-channel is punctured. Higher 16 bits are
+ *     reserved.
+ *
  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3276,6 +3302,9 @@
 
        NL80211_ATTR_TX_HW_TIMESTAMP,
        NL80211_ATTR_RX_HW_TIMESTAMP,
+       NL80211_ATTR_TD_BITMAP,
+
+       NL80211_ATTR_PUNCT_BITMAP,
 
        /* add attributes here, update the policy in nl80211.c */
 
@@ -5866,6 +5895,7 @@
 #define NL80211_KEK_LEN                        16
 #define NL80211_KCK_EXT_LEN            24
 #define NL80211_KEK_EXT_LEN            32
+#define NL80211_KCK_EXT_LEN_32         32
 #define NL80211_REPLAY_CTR_LEN         8
 
 /**
@@ -6291,6 +6321,11 @@
  *     might apply, e.g. no scans in progress, no offchannel operations
  *     in progress, and no active connections.
  *
+ * @NL80211_EXT_FEATURE_PUNCT: Driver supports preamble puncturing in AP mode.
+ *
+ * @NL80211_EXT_FEATURE_SECURE_NAN: Device supports NAN Pairing which enables
+ *     authentication, data encryption and message integrity.
+ *
  * @NUM_NL80211_EXT_FEATURES: number of extended features.
  * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
  */
@@ -6359,6 +6394,8 @@
        NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD,
        NL80211_EXT_FEATURE_RADAR_BACKGROUND,
        NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE,
+       NL80211_EXT_FEATURE_PUNCT,
+       NL80211_EXT_FEATURE_SECURE_NAN,
 
        /* add new features before the definition below */
        NUM_NL80211_EXT_FEATURES,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/band.c new/iwd-2.5/src/band.c
--- old/iwd-2.4/src/band.c      2023-01-23 19:46:38.000000000 +0100
+++ new/iwd-2.5/src/band.c      2023-05-24 17:38:48.000000000 +0200
@@ -1229,11 +1229,11 @@
                        if (band == BAND_FREQ_6_GHZ)
                                break;
 
-                       if (info->flags & PRIMARY_CHANNEL_UPPER &&
+                       if (info->flags & PRIMARY_CHANNEL_LOWER &&
                                                attr->no_ht40_plus)
                                continue;
 
-                       if (info->flags & PRIMARY_CHANNEL_LOWER &&
+                       if (info->flags & PRIMARY_CHANNEL_UPPER &&
                                                attr->no_ht40_minus)
                                continue;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/common.c new/iwd-2.5/src/common.c
--- old/iwd-2.4/src/common.c    2020-09-05 09:43:41.000000000 +0200
+++ new/iwd-2.5/src/common.c    2023-05-24 17:38:48.000000000 +0200
@@ -78,6 +78,7 @@
        akm & (IE_RSN_AKM_SUITE_8021X |                                 \
                IE_RSN_AKM_SUITE_8021X_SHA256 |                         \
                IE_RSN_AKM_SUITE_FT_OVER_8021X |                        \
+               IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384 |                 \
                IE_RSN_AKM_SUITE_FILS_SHA256 |                          \
                IE_RSN_AKM_SUITE_FILS_SHA384 |                          \
                IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 |                  \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/dpp.c new/iwd-2.5/src/dpp.c
--- old/iwd-2.4/src/dpp.c       2022-11-18 13:31:49.000000000 +0100
+++ new/iwd-2.5/src/dpp.c       2023-05-24 17:38:48.000000000 +0200
@@ -147,6 +147,7 @@
 
        bool mcast_support : 1;
        bool roc_started : 1;
+       bool channel_switch : 1;
 };
 
 static bool dpp_get_started(struct l_dbus *dbus,
@@ -2032,6 +2033,7 @@
                return;
        }
 
+       dpp->channel_switch = false;
        dpp->current_freq = dpp->new_freq;
 
        dpp_send_authenticate_confirm(dpp);
@@ -2112,10 +2114,14 @@
                return;
 
        /*
-        * Should we wait for an ACK then go offchannel?
+        * Requested the peer to move to another channel for the remainder of
+        * the protocol. IWD's current logic prohibits a configurator from
+        * running while not connected, so we can assume here that the new
+        * frequency is the same of the connected BSS. Wait until an ACK is
+        * received for the auth request then cancel the offchannel request.
         */
        if (dpp->current_freq != dpp->new_freq)
-               dpp_start_offchannel(dpp, dpp->new_freq);
+               dpp->channel_switch = true;
 }
 
 static void dpp_handle_frame(struct dpp_sm *dpp,
@@ -2211,13 +2217,34 @@
        if (dpp->state <= DPP_STATE_PRESENCE)
                return;
 
+
+       if (dpp->frame_cookie != cookie)
+               return;
+
        /*
         * Only want to handle the no-ACK case. Re-transmitting an ACKed
         * frame likely wont do any good, at least in the case of DPP.
         */
-       if (dpp->frame_cookie != cookie || ack)
-               return;
+       if (!ack)
+               goto retransmit;
+
+       /*
+        * Special handling for a channel transition when acting as a
+        * configurator. The auth request was sent offchannel so we need to
+        * wait for the ACK before going back to the connected channel.
+        */
+       if (dpp->channel_switch) {
+               if (dpp->offchannel_id) {
+                       offchannel_cancel(dpp->wdev_id, dpp->offchannel_id);
+                       dpp->offchannel_id = 0;
+               }
+
+               dpp->channel_switch = false;
+       }
+
+       return;
 
+retransmit:
        if (dpp->frame_retry > DPP_FRAME_MAX_RETRIES) {
                dpp_reset(dpp);
                return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/eap-mschapv2.c new/iwd-2.5/src/eap-mschapv2.c
--- old/iwd-2.4/src/eap-mschapv2.c      2020-11-30 00:09:41.000000000 +0100
+++ new/iwd-2.5/src/eap-mschapv2.c      2023-05-24 17:38:48.000000000 +0200
@@ -73,7 +73,7 @@
        /* This will always be sizeof(value) */
        uint8_t val_length;
        struct mschapv2_value value;
-       char name[0];
+       char name[];
 } __attribute__((packed));
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/eapol.c new/iwd-2.5/src/eapol.c
--- old/iwd-2.4/src/eapol.c     2023-03-27 17:38:25.000000000 +0200
+++ new/iwd-2.5/src/eapol.c     2023-05-24 17:38:48.000000000 +0200
@@ -110,6 +110,9 @@
                case IE_RSN_AKM_SUITE_OSEN:
                        return cmac_aes(kck, 16, frame, frame_len,
                                                mic, mic_len);
+               case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
+                       return hmac_sha384(kck, 24, frame, frame_len,
+                                               mic, mic_len);
                case IE_RSN_AKM_SUITE_OWE:
                        switch (mic_len) {
                        case 16:
@@ -164,6 +167,10 @@
                case IE_RSN_AKM_SUITE_OSEN:
                        checksum = l_checksum_new_cmac_aes(kck, 16);
                        break;
+               case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
+                       checksum = l_checksum_new_hmac(L_CHECKSUM_SHA384,
+                                                       kck, 24);
+                       break;
                case IE_RSN_AKM_SUITE_OWE:
                        switch (mic_len) {
                        case 16:
@@ -270,6 +277,7 @@
                case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256:
                case IE_RSN_AKM_SUITE_OWE:
                case IE_RSN_AKM_SUITE_OSEN:
+               case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
                        if (key_data_len < 24 || key_data_len % 8)
                                return NULL;
 
@@ -315,6 +323,7 @@
        case EAPOL_KEY_DESCRIPTOR_VERSION_AKM_DEFINED:
                switch (akm) {
                case IE_RSN_AKM_SUITE_OWE:
+               case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
                        switch (mic_len) {
                        case 16:
                                kek_len = 16;
@@ -478,8 +487,7 @@
        if (ek->key_mic)
                return false;
 
-       if (ek->secure != ptk_complete)
-               return false;
+       L_WARN_ON(ek->secure != ptk_complete);
 
        if (ek->encrypted_key_data)
                return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/ft.c new/iwd-2.5/src/ft.c
--- old/iwd-2.4/src/ft.c        2023-03-27 17:38:25.000000000 +0200
+++ new/iwd-2.5/src/ft.c        2023-05-24 17:38:48.000000000 +0200
@@ -1060,11 +1060,6 @@
        struct ft_info *info = user_data;
 
        info->offchannel_id = 0;
-
-       if (!info->parsed) {
-               l_queue_remove(info_list, info);
-               ft_info_destroy(info);
-       }
 }
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/handshake.c new/iwd-2.5/src/handshake.c
--- old/iwd-2.4/src/handshake.c 2022-01-24 22:28:47.000000000 +0100
+++ new/iwd-2.5/src/handshake.c 2023-05-24 17:38:48.000000000 +0200
@@ -1004,7 +1004,7 @@
                                size_t key_len, uint8_t *key_out)
 {
        const uint8_t *kek;
-       size_t kek_len = 16;
+       size_t kek_len = handshake_state_get_kek_len(s);
        size_t padded_len = key_len < 16 ? 16 : align_len(key_len, 8);
 
        if (s->akm_suite & (IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/mpdu.h new/iwd-2.5/src/mpdu.h
--- old/iwd-2.4/src/mpdu.h      2022-11-18 13:31:49.000000000 +0100
+++ new/iwd-2.5/src/mpdu.h      2023-05-24 17:38:48.000000000 +0200
@@ -334,7 +334,7 @@
 struct mmpdu_association_request {
        struct mmpdu_field_capability capability;
        __le16 listen_interval;
-       uint8_t ies[0];
+       uint8_t ies[];
 } __attribute__ ((packed));
 
 /* 802.11, Section 8.3.3.6 */
@@ -342,7 +342,7 @@
        struct mmpdu_field_capability capability;
        __le16 status_code;
        __le16 aid;
-       uint8_t ies[0];
+       uint8_t ies[];
 } __attribute__ ((packed));
 
 /* 802.11, Section 8.3.3.7 */
@@ -350,7 +350,7 @@
        struct mmpdu_field_capability capability;
        __le16 listen_interval;
        unsigned char current_ap_address[6];
-       uint8_t ies[0];
+       uint8_t ies[];
 } __attribute__ ((packed));
 
 /* 802.11, Section 8.3.3.8 */
@@ -358,13 +358,13 @@
        struct mmpdu_field_capability capability;
        __le16 status_code;
        __le16 aid;
-       uint8_t ies[0];
+       uint8_t ies[];
 } __attribute__ ((packed));
 
 /* 802.11, Section 8.3.3.4 */
 struct mmpdu_disassociation {
        __le16 reason_code;
-       uint8_t ies[0];
+       uint8_t ies[];
 } __attribute__ ((packed));
 
 /* 802.11, Section 8.3.3.9 */
@@ -377,14 +377,14 @@
        __le64 timestamp;
        __le16 beacon_interval;
        struct mmpdu_field_capability capability;
-       uint8_t ies[0];
+       uint8_t ies[];
 } __attribute__ ((packed));
 
 /* 802.11, Section 8.3.3.15 */
 struct mmpdu_timing_advertisement {
        __le64 timestamp;
        struct mmpdu_field_capability capability;
-       uint8_t ies[0];
+       uint8_t ies[];
 } __attribute__ ((packed));
 
 /* 802.11, Section 8.3.3.2 */
@@ -392,7 +392,7 @@
        __le64 timestamp;
        __le16 beacon_interval;
        struct mmpdu_field_capability capability;
-       uint8_t ies[0];
+       uint8_t ies[];
 } __attribute__ ((packed));
 
 /* 802.11, Section 8.3.3.11 */
@@ -406,7 +406,7 @@
 /* 802.11, Section 8.3.3.12 */
 struct mmpdu_deauthentication {
        __le16 reason_code;
-       uint8_t ies[0];
+       uint8_t ies[];
 } __attribute__ ((packed));
 
 const struct mmpdu_header *mpdu_validate(const uint8_t *frame, int len);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/netdev.c new/iwd-2.5/src/netdev.c
--- old/iwd-2.4/src/netdev.c    2023-03-27 17:38:25.000000000 +0200
+++ new/iwd-2.5/src/netdev.c    2023-05-24 17:38:48.000000000 +0200
@@ -99,7 +99,7 @@
 struct netdev_ext_key_info {
        uint16_t proto;
        bool noencrypt;
-       struct eapol_frame frame[0];
+       struct eapol_frame frame[];
 };
 
 struct netdev {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/rrm.c new/iwd-2.5/src/rrm.c
--- old/iwd-2.4/src/rrm.c       2022-11-18 13:31:49.000000000 +0100
+++ new/iwd-2.5/src/rrm.c       2023-05-24 17:38:48.000000000 +0200
@@ -138,7 +138,7 @@
        uint8_t bssid[6];
        uint8_t antenna_id;
        __le32 parent_tsf;
-       uint8_t subelements[0];
+       uint8_t subelements[];
 } __attribute__ ((packed));
 
 static struct l_queue *states;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/station.c new/iwd-2.5/src/station.c
--- old/iwd-2.4/src/station.c   2023-03-27 17:38:25.000000000 +0200
+++ new/iwd-2.5/src/station.c   2023-05-24 17:38:48.000000000 +0200
@@ -129,6 +129,7 @@
        bool scanning : 1;
        bool autoconnect : 1;
        bool autoconnect_can_start : 1;
+       bool netconfig_after_roam : 1;
 };
 
 struct anqp_entry {
@@ -1683,6 +1684,7 @@
        station->roam_scan_full = false;
        station->signal_low = false;
        station->roam_min_time.tv_sec = 0;
+       station->netconfig_after_roam = false;
 
        if (station->roam_scan_id)
                scan_cancel(netdev_get_wdev_id(station->netdev),
@@ -1971,6 +1973,65 @@
        return true;
 }
 
+static void station_disconnect_on_error_cb(struct netdev *netdev, bool success,
+                                       void *user_data)
+{
+       struct station *station = user_data;
+       bool continue_autoconnect;
+
+       station_enter_state(station, STATION_STATE_DISCONNECTED);
+
+       continue_autoconnect = station->state == STATION_STATE_CONNECTING_AUTO;
+
+       if (continue_autoconnect) {
+               if (station_autoconnect_next(station) < 0) {
+                       l_debug("Nothing left on autoconnect list");
+                       station_enter_state(station,
+                                       STATION_STATE_AUTOCONNECT_FULL);
+               }
+
+               return;
+       }
+
+       if (station->autoconnect)
+               station_enter_state(station, STATION_STATE_AUTOCONNECT_QUICK);
+}
+
+static void station_netconfig_event_handler(enum netconfig_event event,
+                                                       void *user_data)
+{
+       struct station *station = user_data;
+
+       switch (event) {
+       case NETCONFIG_EVENT_CONNECTED:
+               station_enter_state(station, STATION_STATE_CONNECTED);
+               break;
+       case NETCONFIG_EVENT_FAILED:
+               if (station->connect_pending) {
+                       struct l_dbus_message *reply = dbus_error_failed(
+                                               station->connect_pending);
+
+                       dbus_pending_reply(&station->connect_pending, reply);
+               }
+
+               if (L_IN_SET(station->state, STATION_STATE_CONNECTING,
+                               STATION_STATE_CONNECTING_AUTO))
+                       network_connect_failed(station->connected_network,
+                                               false);
+
+               netdev_disconnect(station->netdev,
+                                       station_disconnect_on_error_cb,
+                                       station);
+               station_reset_connection_state(station);
+
+               station_enter_state(station, STATION_STATE_DISCONNECTING);
+               break;
+       default:
+               l_error("station: Unsupported netconfig event: %d.", event);
+               break;
+       }
+}
+
 static void station_roamed(struct station *station)
 {
        station->roam_scan_full = false;
@@ -1999,7 +2060,14 @@
 
        l_queue_clear(station->roam_bss_list, l_free);
 
-       station_enter_state(station, STATION_STATE_CONNECTED);
+       /* Re-enable netconfig if it never finished on the last BSS */
+       if (station->netconfig_after_roam) {
+               station->netconfig_after_roam = false;
+               L_WARN_ON(!netconfig_configure(station->netconfig,
+                                               station_netconfig_event_handler,
+                                               station));
+       } else
+               station_enter_state(station, STATION_STATE_CONNECTED);
 }
 
 static void station_roam_retry(struct station *station)
@@ -2032,6 +2100,14 @@
                return;
        }
 
+       /* Re-enable netconfig if needed, even on a failed roam */
+       if (station->netconfig_after_roam) {
+               station->netconfig_after_roam = false;
+               L_WARN_ON(!netconfig_configure(station->netconfig,
+                                               station_netconfig_event_handler,
+                                               station));
+       }
+
        /*
         * We were told by the AP to roam, but failed.  Try ourselves or
         * wait for the AP to tell us to roam again
@@ -2060,65 +2136,6 @@
        station_roam_retry(station);
 }
 
-static void station_disconnect_on_error_cb(struct netdev *netdev, bool success,
-                                       void *user_data)
-{
-       struct station *station = user_data;
-       bool continue_autoconnect;
-
-       station_enter_state(station, STATION_STATE_DISCONNECTED);
-
-       continue_autoconnect = station->state == STATION_STATE_CONNECTING_AUTO;
-
-       if (continue_autoconnect) {
-               if (station_autoconnect_next(station) < 0) {
-                       l_debug("Nothing left on autoconnect list");
-                       station_enter_state(station,
-                                       STATION_STATE_AUTOCONNECT_FULL);
-               }
-
-               return;
-       }
-
-       if (station->autoconnect)
-               station_enter_state(station, STATION_STATE_AUTOCONNECT_QUICK);
-}
-
-static void station_netconfig_event_handler(enum netconfig_event event,
-                                                       void *user_data)
-{
-       struct station *station = user_data;
-
-       switch (event) {
-       case NETCONFIG_EVENT_CONNECTED:
-               station_enter_state(station, STATION_STATE_CONNECTED);
-               break;
-       case NETCONFIG_EVENT_FAILED:
-               if (station->connect_pending) {
-                       struct l_dbus_message *reply = dbus_error_failed(
-                                               station->connect_pending);
-
-                       dbus_pending_reply(&station->connect_pending, reply);
-               }
-
-               if (L_IN_SET(station->state, STATION_STATE_CONNECTING,
-                               STATION_STATE_CONNECTING_AUTO))
-                       network_connect_failed(station->connected_network,
-                                               false);
-
-               netdev_disconnect(station->netdev,
-                                       station_disconnect_on_error_cb,
-                                       station);
-               station_reset_connection_state(station);
-
-               station_enter_state(station, STATION_STATE_DISCONNECTING);
-               break;
-       default:
-               l_error("station: Unsupported netconfig event: %d.", event);
-               break;
-       }
-}
-
 static void station_reassociate_cb(struct netdev *netdev,
                                        enum netdev_result result,
                                        void *event_data,
@@ -2313,8 +2330,12 @@
        ft_authenticate(netdev_get_ifindex(station->netdev), bss);
 
 done:
-       wiphy_radio_work_insert(station->wiphy, &station->ft_work,
-                               WIPHY_WORK_PRIORITY_CONNECT, &ft_work_ops);
+       if (station->ft_work.id)
+               wiphy_radio_work_reschedule(station->wiphy, &station->ft_work);
+       else
+               wiphy_radio_work_insert(station->wiphy, &station->ft_work,
+                                       WIPHY_WORK_PRIORITY_CONNECT,
+                                       &ft_work_ops);
 
        return true;
 }
@@ -2404,8 +2425,20 @@
                l_free(rbss);
        }
 
-       if (!roaming)
+       if (!roaming) {
                station_roam_failed(station);
+               return;
+       }
+
+       /*
+        * Netconfig could potentially be running and not completed yet. We
+        * still should roam in this case but need to restart netconfig once the
+        * roam is finished.
+        */
+       if (station->netconfig && station->state != STATION_STATE_CONNECTED) {
+               netconfig_reset(station->netconfig);
+               station->netconfig_after_roam = true;
+       }
 }
 
 static void station_roam_scan_triggered(int err, void *user_data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/wiphy.c new/iwd-2.5/src/wiphy.c
--- old/iwd-2.4/src/wiphy.c     2023-02-02 13:57:32.000000000 +0100
+++ new/iwd-2.5/src/wiphy.c     2023-05-24 17:38:48.000000000 +0200
@@ -2574,16 +2574,13 @@
 {
        struct wiphy_radio_work_item *work;
        bool done;
+       uint32_t id;
 
-       work = l_queue_peek_head(wiphy->work);
+       work = l_queue_pop_head(wiphy->work);
        if (!work)
                return;
 
-       /*
-        * Ensures no other work item will get inserted before this one while
-        * the work is being done.
-        */
-       work->priority = INT_MIN;
+       id = work->id;
 
        l_debug("Starting work item %u", work->id);
 
@@ -2592,15 +2589,25 @@
        wiphy->work_in_callback = false;
 
        if (done) {
-               work->id = 0;
+               /* Item was rescheduled, don't destroy */
+               if (work->id != id)
+                       goto next;
 
-               l_queue_remove(wiphy->work, work);
+               work->id = 0;
 
                wiphy->work_in_callback = true;
                destroy_work(work);
                wiphy->work_in_callback = false;
 
+next:
                wiphy_radio_work_next(wiphy);
+       } else {
+               /*
+                * Ensures no other work item will get inserted before this one
+                * while the work is being done.
+                */
+               work->priority = INT_MIN;
+               l_queue_push_head(wiphy->work, work);
        }
 }
 
@@ -2684,6 +2691,28 @@
        return item == l_queue_peek_head(wiphy->work) ? 1 : 0;
 }
 
+uint32_t wiphy_radio_work_reschedule(struct wiphy *wiphy,
+                                       struct wiphy_radio_work_item *item)
+{
+       /*
+        * This should only be called from within the do_work callback, meaning
+        * the item should not be in the queue. Any re-insertion on a running
+        * item after do_work is not allowed.
+        */
+       if (L_WARN_ON(wiphy_radio_work_is_running(wiphy, item->id) != -ENOENT))
+               return 0;
+
+       work_ids++;
+
+       l_debug("Rescheduling work item %u, new id %u", item->id, work_ids);
+
+       item->id = work_ids;
+
+       l_queue_insert(wiphy->work, item, insert_by_priority, NULL);
+
+       return item->id;
+}
+
 static int wiphy_init(void)
 {
        struct l_genl *genl = iwd_get_genl();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/src/wiphy.h new/iwd-2.5/src/wiphy.h
--- old/iwd-2.4/src/wiphy.h     2023-01-23 19:46:38.000000000 +0100
+++ new/iwd-2.5/src/wiphy.h     2023-05-24 17:38:48.000000000 +0200
@@ -168,3 +168,5 @@
                                const struct wiphy_radio_work_item_ops *ops);
 void wiphy_radio_work_done(struct wiphy *wiphy, uint32_t id);
 int wiphy_radio_work_is_running(struct wiphy *wiphy, uint32_t id);
+uint32_t wiphy_radio_work_reschedule(struct wiphy *wiphy,
+                                       struct wiphy_radio_work_item *item);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/iwd-2.4/tools/hwsim.c new/iwd-2.5/tools/hwsim.c
--- old/iwd-2.4/tools/hwsim.c   2022-11-18 13:31:49.000000000 +0100
+++ new/iwd-2.5/tools/hwsim.c   2023-05-24 17:38:48.000000000 +0200
@@ -2092,6 +2092,19 @@
                                rule_add, "o", "", "path");
 }
 
+static void destroy_rule(void *user_data)
+{
+       struct hwsim_rule *rule = user_data;
+
+       if (rule->prefix)
+               l_free(rule->prefix);
+
+       if (rule->match)
+               l_free(rule->match);
+
+       l_free(rule);
+}
+
 static struct l_dbus_message *rule_remove(struct l_dbus *dbus,
                                                struct l_dbus_message *message,
                                                void *user_data)
@@ -2102,13 +2115,8 @@
        path = rule_get_path(rule);
        l_queue_remove(rules, rule);
 
-       if (rule->prefix)
-               l_free(rule->prefix);
+       destroy_rule(rule);
 
-       if (rule->match)
-               l_free(rule->match);
-
-       l_free(rule);
        l_dbus_unregister_object(dbus, path);
 
        return l_dbus_message_new_method_return(message);
@@ -3131,7 +3139,7 @@
 
        l_dbus_destroy(dbus);
        hwsim_radio_cache_cleanup();
-       l_queue_destroy(rules, l_free);
+       l_queue_destroy(rules, destroy_rule);
 
        l_netlink_destroy(rtnl);
 

Reply via email to