diff options
author | Renato Botelho <renato@netgate.com> | 2015-12-30 15:53:44 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-12-30 15:53:44 -0200 |
commit | dae9ce3f4edd25bf13dc462f2503fdd112cbd2d9 (patch) | |
tree | f757367cf93b1d0d2ce0a5a94034ce8ca3f8133a | |
parent | 921a14bd0ae313f36070e9554388f0e8ae670b63 (diff) | |
parent | ec513fa9b85f1456d0af739d4f1c305abaecbbe7 (diff) | |
download | pfsense-dae9ce3f4edd25bf13dc462f2503fdd112cbd2d9.zip pfsense-dae9ce3f4edd25bf13dc462f2503fdd112cbd2d9.tar.gz |
Merge pull request #2325 from stilez/patch-7
-rw-r--r-- | src/usr/local/www/services_dhcp.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php index 657cbc8..a30a488 100644 --- a/src/usr/local/www/services_dhcp.php +++ b/src/usr/local/www/services_dhcp.php @@ -403,15 +403,14 @@ if (isset($_POST['submit'])) { $subnet_start = ip2ulong(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn))); $subnet_end = ip2ulong(long2ip32(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn)))); - if ((ip2ulong($_POST['range_from']) < $subnet_start) || (ip2ulong($_POST['range_from']) > $subnet_end) || - (ip2ulong($_POST['range_to']) < $subnet_start) || (ip2ulong($_POST['range_to']) > $subnet_end)) { - $input_errors[] = gettext("The specified range lies outside of the current subnet."); - } - if (ip2ulong($_POST['range_from']) > ip2ulong($_POST['range_to'])) { $input_errors[] = gettext("The range is invalid (first element higher than second element)."); } + if (ip2ulong($_POST['range_from']) < $subnet_start || ip2ulong($_POST['range_to']) > $subnet_end) { + $input_errors[] = gettext("The specified range lies outside of the current subnet."); + } + if (is_numeric($pool) || ($act == "newpool")) { $rfrom = $config['dhcpd'][$if]['range']['from']; $rto = $config['dhcpd'][$if]['range']['to']; |