diff options
author | Jo-Philipp Wich <jo@mein.io> | 2017-01-30 19:14:08 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-01-30 19:14:08 +0100 |
commit | d85f7a8a00bfa80ab1e8613446eb4d722dcd6ea5 (patch) | |
tree | 7b9cd59e4ac5b084745c41c1eefc656851a37ae1 /modules/luci-base | |
parent | 926935f83170e38452a5191d13aa8b04021606ff (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/luci-base')
-rw-r--r-- | modules/luci-base/luasrc/cbi/datatypes.lua | 4 |
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 98f6a44d77..72b41ddad8 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 |