lib: ip: verify ip is valid in 'check'
This commit is contained in:
parent
0112dd87ac
commit
49232423ca
|
@ -65,7 +65,8 @@ rec {
|
||||||
from = baseIp;
|
from = baseIp;
|
||||||
to = zipListsWith (b: m: 255 - m + b) baseIp mask;
|
to = zipListsWith (b: m: 255 - m + b) baseIp mask;
|
||||||
};
|
};
|
||||||
check = ip: baseIp == zipListsWith (b: m: bitAnd b m) ip mask;
|
check =
|
||||||
|
ip: isValidIp4 ip && baseIp == zipListsWith (b: m: bitAnd b m) ip mask;
|
||||||
try =
|
try =
|
||||||
if baseIp == givenIp
|
if baseIp == givenIp
|
||||||
then id
|
then id
|
||||||
|
|
Loading…
Reference in a new issue