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"In reply to Re^2: finding if an ip is in a subnet
by Anonymous Monk
in thread finding if an ip is in a subnet
by AltGrendel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |