summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2017-01-30 19:14:08 +0100
committerJo-Philipp Wich <jo@mein.io>2017-01-30 19:14:54 +0100
commit46fd88ec6c4ce7da611c45cbe2b3a0791d6c4e06 (patch)
tree40b3c1ac66c68d7c4da1281ca37ff9d0cd195742 /modules
parent472dc4b9e2ca71c114f5da70cb612c1089b8daa7 (diff)
luci-base: fix logic errors in ipmask4 and ipmask6 datatype validators
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/luasrc/cbi/datatypes.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-base/luasrc/cbi/datatypes.lua b/modules/luci-base/luasrc/cbi/datatypes.lua
index 98f6a44d7..72b41ddad 100644
--- a/modules/luci-base/luasrc/cbi/datatypes.lua
+++ b/modules/luci-base/luasrc/cbi/datatypes.lua
@@ -143,7 +143,7 @@ function ipmask4(val)
return false
end
- if not bits and not ip4addr(mask) then
+ if not bits and mask and not ip4addr(mask) then
return false
end
@@ -158,7 +158,7 @@ function ipmask6(val)
return false
end
- if not bits and not ip6addr(mask) then
+ if not bits and mask and not ip6addr(mask) then
return false
end