Project

General

Profile

« Previous | Next » 

Revision f193cf92

Added by Simon Cornelius P. Umacob over 16 years ago

Merge IPv6 changes

View differences:

usr/local/www/system.php
38 38

  
39 39

  
40 40
require("guiconfig.inc");
41
require_once("IPv6.inc");
41 42

  
42 43
$pconfig['hostname'] = $config['system']['hostname'];
43 44
$pconfig['domain'] = $config['system']['domain'];
......
110 111
	if ($_POST['domain'] && !is_domain($_POST['domain'])) {
111 112
		$input_errors[] = "The domain may only contain the characters a-z, 0-9, '-' and '.'.";
112 113
	}
114
        /*
113 115
	if (($_POST['dns1'] && !is_ipaddr($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddr($_POST['dns2']))) {
114 116
		$input_errors[] = "A valid IP address must be specified for the primary/secondary DNS server.";
115 117
	}
116 118
	if (($_POST['dns3'] && !is_ipaddr($_POST['dns3'])) || ($_POST['dns4'] && !is_ipaddr($_POST['dns4']))) {
117 119
		$input_errors[] = "A valid IP address must be specified for the primary/secondary DNS server.";
118 120
	}	
121
        */
122

  
123
	if (
124
		$_POST['dns1'] && !is_ipaddr($_POST['dns1']) && !Net_IPv6::checkIPv6($_POST['dns1']) ||
125
		$_POST['dns2'] && !is_ipaddr($_POST['dns2']) && !Net_IPv6::checkIPv6($_POST['dns2']) ||
126
		$_POST['dns3'] && !is_ipaddr($_POST['dns3']) && !Net_IPv6::checkIPv6($_POST['dns3']) ||
127
		$_POST['dns4'] && !is_ipaddr($_POST['dns4']) && !Net_IPv6::checkIPv6($_POST['dns4'])
128
	) {
129
		$input_errors[] = "A valid IPv4/IPv6 address must be specified for the primary/secondary DNS server.";
130
	}
131

  
132

  
119 133
	if ($_POST['webguiport'] && (!is_numericint($_POST['webguiport']) ||
120 134
			($_POST['webguiport'] < 1) || ($_POST['webguiport'] > 65535))) {
121 135
		$input_errors[] = "A valid TCP/IP port must be specified for the webConfigurator port.";
......
253 267
				<td width="78%" class="vtable"> <input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
254 268
					<br/>
255 269
					<span class="vexpl">
256
						e.g. <em>mycorp.com</em>
270
						e.g. <em>example.com</em>
257 271
					</span>
258 272
				</td>
259 273
			</tr>
......
307 321
						</table>
308 322
						<br>
309 323
						<span class="vexpl">
310
							IP addresses; these are also used for the DHCP
324
							IPv4/IPv6 addresses; these are also used for the DHCP
311 325
							service, DNS forwarder and for PPTP VPN clients.
312 326
							<br/>
313 327
							<?php if($multiwan): ?>

Also available in: Unified diff