diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-11-22 09:23:03 -0700 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-11-22 09:23:03 -0700 |
commit | bddcbff2742d2855aa47b7af551aee11410183ca (patch) | |
tree | ac9f79f26131b8749d0b54a0852f2413de96c101 | |
parent | d48dbceb9570a322e0ce8a7200847eeddfac22f9 (diff) | |
download | pfsense-bddcbff2742d2855aa47b7af551aee11410183ca.zip pfsense-bddcbff2742d2855aa47b7af551aee11410183ca.tar.gz |
When adding/editing a gateway, check IP alias subnets, too. Fixes #1015
-rwxr-xr-x | usr/local/www/system_gateways_edit.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php index 21f37ab..025ff97 100755 --- a/usr/local/www/system_gateways_edit.php +++ b/usr/local/www/system_gateways_edit.php @@ -116,7 +116,7 @@ if ($_POST) { $parent_ip = get_interface_ip($_POST['interface']); if (is_ipaddr($parent_ip)) { $parent_sn = get_interface_subnet($_POST['interface']); - if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn)) { + if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['interface'], $_POST['gateway'])) { $input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']); } } |