diff options
author | Scott Ullrich <sullrich@gmail.com> | 2011-07-10 12:03:50 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@gmail.com> | 2011-07-10 12:03:50 -0400 |
commit | 7988ce7581efee9aef0184edfb2eeb2f352477a8 (patch) | |
tree | dd42905e57ea40aeeefe86a919ff48793d32dac4 /usr/local/www/services_dhcp.php | |
parent | f745b8ef215242e1e6f5fa0b93d2f77fe7397f96 (diff) | |
download | pfsense-7988ce7581efee9aef0184edfb2eeb2f352477a8.zip pfsense-7988ce7581efee9aef0184edfb2eeb2f352477a8.tar.gz |
Do not check to see if gateay falls within a null value. Resolves #1664
Diffstat (limited to 'usr/local/www/services_dhcp.php')
-rwxr-xr-x | usr/local/www/services_dhcp.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index fdd70a9..4045ead 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -217,12 +217,10 @@ if ($_POST) { if (($_POST['wins1'] && !is_ipaddr($_POST['wins1'])) || ($_POST['wins2'] && !is_ipaddr($_POST['wins2']))) $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary WINS servers."); $parent_ip = get_interface_ip($_POST['if']); - if (is_ipaddr($parent_ip)) { + if (is_ipaddr($parent_ip) && $_POST['gateway']) $parent_sn = get_interface_subnet($_POST['if']); - if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['if'], $_POST['gateway'])) { + if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['if'], $_POST['gateway'])) $input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']); - } - } if (($_POST['dns1'] && !is_ipaddr($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddr($_POST['dns2']))) $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS servers."); |