summaryrefslogtreecommitdiffhomepage
path: root/libs/web
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-12-16 01:18:34 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-12-16 01:18:34 +0000
commit757e9c2f1cb49b312322d29f8a4933ecedbbdaec (patch)
tree1bdf381f561a6d0b81d1e38326d2a6336c72fa18 /libs/web
parentcdcfb5502be8fd07bcf26d5cac8ac8c5d14ba209 (diff)
libs/web: add missing parts of previous commit
Diffstat (limited to 'libs/web')
-rw-r--r--libs/web/luasrc/cbi/datatypes.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/web/luasrc/cbi/datatypes.lua b/libs/web/luasrc/cbi/datatypes.lua
index 3c768ab76..93b29cba8 100644
--- a/libs/web/luasrc/cbi/datatypes.lua
+++ b/libs/web/luasrc/cbi/datatypes.lua
@@ -154,6 +154,10 @@ function host(val)
return hostname(val) or ipaddr(val)
end
+function network(val)
+ return uciname(val) or host(val)
+end
+
function wpakey(val)
if #val == 64 then
return (val:match("^[a-fA-F0-9]+$") ~= nil)