Fix logic of is_inrange()

This commit is contained in:
Renato Botelho 2013-01-24 12:25:04 -02:00
parent 507628d5a2
commit 736698bd60

View File

@ -200,7 +200,7 @@ $ifcfgip = $config['interfaces'][$if]['ipaddr'];
$ifcfgsn = $config['interfaces'][$if]['subnet'];
function is_inrange($test, $start, $end) {
if ( (ip2ulong($test) < ip2ulong($end)) && (ip2ulong($test) > ip2ulong($start)) )
if ( (ip2ulong($test) <= ip2ulong($end)) && (ip2ulong($test) >= ip2ulong($start)) )
return true;
else
return false;