diff options
Diffstat (limited to 'modules/luci-base/luasrc/model/network.lua')
-rw-r--r-- | modules/luci-base/luasrc/model/network.lua | 8 |
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") |