projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #798 from thoto/feature_lstat
[project/luci.git]
/
modules
/
luci-base
/
luasrc
/
model
/
network.lua
diff --git
a/modules/luci-base/luasrc/model/network.lua
b/modules/luci-base/luasrc/model/network.lua
index
2d8336b
..
49d91b8
100644
(file)
--- 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
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
function protocol.is_bridge(self)
return (not self:is_virtual() and self:type() == "bridge")
end