[openwrt/openwrt] wpa_supplicant: use a timer to defer starting interfaces
LEDE Commits
lede-commits at lists.infradead.org
Fri Oct 31 13:23:07 PDT 2025
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e373a32a7c919989989f7e552774a7ba1d937833
commit e373a32a7c919989989f7e552774a7ba1d937833
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Oct 31 18:33:21 2025 +0000
wpa_supplicant: use a timer to defer starting interfaces
This allows wpa_supplicant to process pending netlink socket messages
first. Without this change, there is a race condition where the newly
created interface processes netlink events from the removal of the
previous interface.
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
package/network/services/hostapd/files/wpa_supplicant.uc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/network/services/hostapd/files/wpa_supplicant.uc b/package/network/services/hostapd/files/wpa_supplicant.uc
index 20613ae702..2f0279d069 100644
--- a/package/network/services/hostapd/files/wpa_supplicant.uc
+++ b/package/network/services/hostapd/files/wpa_supplicant.uc
@@ -1,4 +1,5 @@
let libubus = require("ubus");
+import * as uloop from "uloop";
import { open, readfile } from "fs";
import { wdev_create, wdev_set_mesh_params, wdev_remove, is_equal, wdev_set_up, vlist_new, phy_open } from "common";
@@ -549,7 +550,7 @@ let main_obj = {
set_config(phy, req.args.phy, req.args.radio, req.args.num_global_macaddr, req.args.macaddr_base, req.args.config);
if (!req.args.defer)
- start_pending(phy);
+ uloop.timer(100, () => start_pending(phy));
return {
pid: wpas.getpid()
More information about the lede-commits
mailing list