From 1bd021e39e56baba292fce7ab8c09b571d8aa1e9 Mon Sep 17 00:00:00 2001 From: timdufrane Date: Thu, 21 Nov 2013 13:38:43 -0500 Subject: Add DHCP without gateway capability --- usr/local/www/services_dhcp.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index 3b136c9..2566cd8 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -241,12 +241,12 @@ if ($_POST) { $input_errors[] = gettext("A valid range must be specified."); if (($_POST['range_to'] && !is_ipaddrv4($_POST['range_to']))) $input_errors[] = gettext("A valid range must be specified."); - if (($_POST['gateway'] && !is_ipaddrv4($_POST['gateway']))) + if (($_POST['gateway'] && $_POST['gateway'] != "none" && !is_ipaddrv4($_POST['gateway']))) $input_errors[] = gettext("A valid IP address must be specified for the gateway."); if (($_POST['wins1'] && !is_ipaddrv4($_POST['wins1'])) || ($_POST['wins2'] && !is_ipaddrv4($_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_ipaddrv4($parent_ip) && $_POST['gateway']) { + if (is_ipaddrv4($parent_ip) && $_POST['gateway'] && $_POST['gateway'] != "none") { $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'])) $input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']); @@ -890,7 +890,7 @@ include("head.inc");
- + -- cgit v1.1