Project

General

Profile

« Previous | Next » 

Revision 45d1024d

Added by Scott Ullrich about 14 years ago

Do not check to see if gateay falls within a null value. Resolves #1664

View differences:

usr/local/www/services_dhcp.php
217 217
		if (($_POST['wins1'] && !is_ipaddr($_POST['wins1'])) || ($_POST['wins2'] && !is_ipaddr($_POST['wins2'])))
218 218
			$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary WINS servers.");
219 219
		$parent_ip = get_interface_ip($_POST['if']);
220
		if (is_ipaddr($parent_ip) && $_POST['gateway']) 
220
		if (is_ipaddr($parent_ip) && $_POST['gateway']) {
221 221
			$parent_sn = get_interface_subnet($_POST['if']);
222 222
			if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['if'], $_POST['gateway'])) 
223 223
				$input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']);
224
		}
224 225
		if (($_POST['dns1'] && !is_ipaddr($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddr($_POST['dns2'])))
225 226
			$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS servers.");
226 227

  

Also available in: Unified diff