[openwrt/openwrt] wpa_supplicant: add support for issuing control socket commands via ubus
LEDE Commits
lede-commits at lists.infradead.org
Fri Oct 31 13:23:06 PDT 2025
nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3ab2f32006514549525e4d29136eab813017d96e
commit 3ab2f32006514549525e4d29136eab813017d96e
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Oct 30 19:44:38 2025 +0000
wpa_supplicant: add support for issuing control socket commands via ubus
This makes it possible to have more flexible control over the supplicant
without having to install wpa_cli.
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
package/network/services/hostapd/files/wpa_supplicant.uc | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/package/network/services/hostapd/files/wpa_supplicant.uc b/package/network/services/hostapd/files/wpa_supplicant.uc
index b77e0648e9..20613ae702 100644
--- a/package/network/services/hostapd/files/wpa_supplicant.uc
+++ b/package/network/services/hostapd/files/wpa_supplicant.uc
@@ -773,6 +773,20 @@ function iface_ubus_add(ifname)
return 0;
},
},
+ control: {
+ args: {
+ command: ""
+ },
+ call: (req) => {
+ let iface = wpas.interfaces[ifname];
+ if (!iface)
+ return libubus.STATUS_NOT_FOUND;
+
+ return {
+ result: iface.ctrl(req.args.command)
+ };
+ },
+ },
});
wpas.data.iface_ubus[ifname] = obj;
}
More information about the lede-commits
mailing list