summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-02-24 08:51:31 -0300
committerRenato Botelho <renato@netgate.com>2016-02-24 11:01:49 -0300
commit0e6a3434096a62598775b6eaa7c8cfa70e5ffa7e (patch)
treeac417234516ac7f788b3a43f670812aac6a849c0 /src/usr/local/www/services_dhcp.php
parent49aab2599ca7dcc961224aa581d2669bd870f268 (diff)
downloadpfsense-0e6a3434096a62598775b6eaa7c8cfa70e5ffa7e.zip
pfsense-0e6a3434096a62598775b6eaa7c8cfa70e5ffa7e.tar.gz
Check the end of range to make sure it's inside subnet too
Diffstat (limited to 'src/usr/local/www/services_dhcp.php')
-rw-r--r--src/usr/local/www/services_dhcp.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php
index 31a36eb..68165ee 100644
--- a/src/usr/local/www/services_dhcp.php
+++ b/src/usr/local/www/services_dhcp.php
@@ -433,7 +433,8 @@ if (isset($_POST['submit'])) {
$input_errors[] = gettext("The range is invalid (first element higher than second element).");
}
- if (!is_inrange_v4($_POST['range_from'], $subnet_start, $subnet_end)) {
+ if (!is_inrange_v4($_POST['range_from'], $subnet_start, $subnet_end) ||
+ !is_inrange_v4($_POST['range_to'], $subnet_start, $subnet_end)) {
$input_errors[] = gettext("The specified range lies outside of the current subnet.");
}
OpenPOWER on IntegriCloud