diff options
author | Renato Botelho <renato@netgate.com> | 2016-02-24 08:51:31 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-02-24 11:01:49 -0300 |
commit | 0e6a3434096a62598775b6eaa7c8cfa70e5ffa7e (patch) | |
tree | ac417234516ac7f788b3a43f670812aac6a849c0 | |
parent | 49aab2599ca7dcc961224aa581d2669bd870f268 (diff) | |
download | pfsense-0e6a3434096a62598775b6eaa7c8cfa70e5ffa7e.zip pfsense-0e6a3434096a62598775b6eaa7c8cfa70e5ffa7e.tar.gz |
Check the end of range to make sure it's inside subnet too
-rw-r--r-- | src/usr/local/www/services_dhcp.php | 3 |
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."); } |