diff options
author | Jo-Philipp Wich <jo@mein.io> | 2017-01-28 13:45:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-28 13:45:44 +0100 |
commit | e6f158b2ee3cbc8b81734a21ab6aa1db7ff020ac (patch) | |
tree | cde177de7120a18110d6281deebc3137241128d2 /modules/luci-base | |
parent | f5461669afa4aba943ecc5800d9a468fb0ce1cd0 (diff) | |
parent | 5377d22b4a8d8f2234ddb5e65783343a6f2f6897 (diff) |
Merge pull request #981 from NvrBst/pull-request-ipv6_prefix_status_display
mod-admin-full: Add IPv6 Prefix Delegation information to Status Pages
Diffstat (limited to 'modules/luci-base')
-rw-r--r-- | modules/luci-base/luasrc/model/network.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-base/luasrc/model/network.lua index 2d8336bf33..49d91b875a 100644 --- a/modules/luci-base/luasrc/model/network.lua +++ b/modules/luci-base/luasrc/model/network.lua @@ -950,6 +950,13 @@ function protocol.dns6addrs(self) return dns end +function protocol.ip6prefix(self) + local prefix = self:_ubus("ipv6-prefix") + if prefix and #prefix > 0 then + return "%s/%d" %{ prefix[1].address, prefix[1].mask } + end +end + function protocol.is_bridge(self) return (not self:is_virtual() and self:type() == "bridge") end |