diff options
author | Bill Marquette <billm@pfsense.org> | 2005-08-22 04:19:54 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-08-22 04:19:54 +0000 |
commit | 4f3c4086f19f47534c9eda8bf68e4e2a9ac9e533 (patch) | |
tree | 091f9f89a122a93296e45295b7b8b5b123d51186 /usr/local | |
parent | 1a82cbcb44300b57821bb07fffeca4ac91dfd795 (diff) | |
download | pfsense-4f3c4086f19f47534c9eda8bf68e4e2a9ac9e533.zip pfsense-4f3c4086f19f47534c9eda8bf68e4e2a9ac9e533.tar.gz |
use ip2long() to check ip addresses
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/services_dhcp.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index 32c44c1..92a7b5e 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -69,12 +69,9 @@ staticmaps_sort($if); $a_maps = &$config['dhcpd'][$if]['staticmap']; function is_inrange($test, $start, $end) { - $tmp = explode(".", $test); - $o_test = $tmp[3]; - $tmp = explode(".", $start); - $o_start = $tmp[3]; - $tmp = explode(".", $end); - $o_end = $tmp[3]; + $o_test = sprintf("%u", ip2long($test)); + $o_start = sprintf("%u", ip2long($start)); + $o_end = sprintf("%u", ip2long($end)); if ( ($o_test < $o_end) && ($o_test > $o_start) ) return true; |