summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-wireguard/root/usr/share/rpcd
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-11-23 13:15:07 +0100
committerJo-Philipp Wich <jo@mein.io>2022-11-23 13:20:42 +0100
commit22c51acf81eccb2b690d8a012c379af06a7bccfb (patch)
tree563982cc94eec17eb41c48082186ff6e37357e95 /protocols/luci-proto-wireguard/root/usr/share/rpcd
parent8012ad2ad5a040e52c984f1cef07d4ef2e1c1325 (diff)
luci-proto-wireguard: fix loading peer descriptions
Explicitly load `network` uci in wireguard rpcd backend as `ctx.foreach()` does not implicitly load it. Also remove leftover test setup information from the status page source. Fixes: #6095 Fixes: 008fa18878 ("luci-proto-wireguard: rewrite rpcd handler in ucode") Fixes: 6e6fce3eb4 ("luci-proto-wireguard: merge status page functionality") Ref: https://github.com/jow-/ucode/pull/126 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'protocols/luci-proto-wireguard/root/usr/share/rpcd')
-rw-r--r--protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard2
1 files changed, 2 insertions, 0 deletions
diff --git a/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard b/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
index fc99919127..add810c8ae 100644
--- a/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
+++ b/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
@@ -52,6 +52,8 @@ const methods = {
const wg_dump = popen("wg show all dump 2>/dev/null");
if (wg_dump) {
+ uci.load("network");
+
for (let line = wg_dump.read('line'); length(line); line = wg_dump.read('line')) {
const record = split(rtrim(line, '\n'), '\t');