mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-02-19 15:51:15 +01:00
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@nbd.name>
This commit is contained in:
parent
0d189171e1
commit
3ab2f32006
1 changed files with 14 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue