in reply to Re: finding if an ip is in a subnet
in thread finding if an ip is in a subnet

This is not working, "(getIp(@a[0 .. 3]) + (2 ** (32 - $a[4])".

By example 10.3.3.0/30 use 10.3.3.0 to 10.3.3.3 but with your method it will return 10.3.3.0 to 10.3.3.4 because 10.3.3.0 + 2 ** 2 = 10.3.3.4

you need to add '-1' to this, like "(2 ** (32 - $a[4])) - 1"