luci-base: fix logic errors in ipmask4 and ipmask6 datatype validators
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
926935f831
commit
d85f7a8a00
1 changed files with 2 additions and 2 deletions
|
@ -143,7 +143,7 @@ function ipmask4(val)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
if not bits and not ip4addr(mask) then
|
if not bits and mask and not ip4addr(mask) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ function ipmask6(val)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
if not bits and not ip6addr(mask) then
|
if not bits and mask and not ip6addr(mask) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue