projects
/
openwrt
/
staging
/
blocktrron.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d18917
)
wpa_supplicant: add support for issuing control socket commands via ubus
author
Felix Fietkau
<nbd@nbd.name>
Thu, 30 Oct 2025 19:44:38 +0000
(19:44 +0000)
committer
Felix Fietkau
<nbd@nbd.name>
Fri, 31 Oct 2025 20:22:35 +0000
(21:22 +0100)
This makes it possible to have more flexible control over the supplicant
without having to install wpa_cli.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/files/wpa_supplicant.uc
patch
|
blob
|
history
diff --git
a/package/network/services/hostapd/files/wpa_supplicant.uc
b/package/network/services/hostapd/files/wpa_supplicant.uc
index b77e0648e9319302b081c991c33d80143e9b0194..20613ae702d6cbcdaf61c8391aa1c36b2b88e5cd 100644
(file)
--- 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;
}