From c9eca74f2b37afff309474a6b2ff24b22087bed8 Mon Sep 17 00:00:00 2001 From: sullrich Date: Wed, 2 Dec 2009 19:04:16 -0500 Subject: Show correct availavble usable range and disallow using network or broadcast address. Ticket #145 --- usr/local/www/services_dhcp.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'usr') diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index c2a844c..7d45643 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -228,6 +228,9 @@ if ($_POST) { if(gen_subnet_max($ifcfgip, $ifcfgsn) == $_POST['range_to']) $input_errors[] = "You cannot use the broadcast address in the ending subnet range."; + //if(is_inrange($ifcfgip, $_POST['range_from'], $_POST['range_to'])) + // $input_errors[] = "Address range includes the interface IP $ifcfgip."; + if (!$input_errors) { /* make sure the range lies within the current subnet */ $subnet_start = (ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn)); @@ -511,19 +514,25 @@ include("head.inc"); - Subnet - mask + Subnet mask - Available - range + Available range - + - - + -- cgit v1.1