summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/model/network.lua
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2019-09-13 22:38:33 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2019-09-13 22:38:33 +0200
commitae27901c888a8c4565be25c5e36904654739c089 (patch)
tree86e586b1795fc88586f5c491ec4f30778432152e /modules/luci-base/luasrc/model/network.lua
parent98cde82e4d585e432efcb468a3e4cdc52b685a25 (diff)
WIP from 2018-11-28multiplipv6prefixes
Diffstat (limited to 'modules/luci-base/luasrc/model/network.lua')
-rw-r--r--modules/luci-base/luasrc/model/network.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-base/luasrc/model/network.lua
index 49e1657aa..5910a7856 100644
--- a/modules/luci-base/luasrc/model/network.lua
+++ b/modules/luci-base/luasrc/model/network.lua
@@ -1119,6 +1119,14 @@ function protocol.ip6prefix(self)
end
end
+function protocol.ip6prefixes(self)
+ local prefixes = { }
+ for _, prefix in ipairs(self:_ubus("ipv6-prefix") or { }) do
+ prefixes[#prefixes+1] = "%s/%d" %{ prefix.address, prefix.mask }
+ end
+ return prefixes
+end
+
function protocol.errors(self)
local _, err, rv
local errors = self:_ubus("errors")