summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/root/usr/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/root/usr/libexec')
-rwxr-xr-xmodules/luci-base/root/usr/libexec/rpcd/luci18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci
index d668e789fb..c4566210f6 100755
--- a/modules/luci-base/root/usr/libexec/rpcd/luci
+++ b/modules/luci-base/root/usr/libexec/rpcd/luci
@@ -178,6 +178,24 @@ local methods = {
end
return result
end
+ },
+
+ leases = {
+ args = { family = 0 },
+ call = function(args)
+ local s = require "luci.tools.status"
+
+ if args.family == 4 then
+ return { dhcp_leases = s.dhcp_leases() }
+ elseif args.family == 6 then
+ return { dhcp6_leases = s.dhcp6_leases() }
+ else
+ return {
+ dhcp_leases = s.dhcp_leases(),
+ dhcp6_leases = s.dhcp6_leases()
+ }
+ end
+ end
}
}