Révision 81af6a08
Ajouté par Phil Davis il y a plus de 9 ans
usr/local/www/services_dhcp_edit.php | ||
---|---|---|
108 | 108 |
$pconfig['domain'] = $a_maps[$id]['domain']; |
109 | 109 |
$pconfig['domainsearchlist'] = $a_maps[$id]['domainsearchlist']; |
110 | 110 |
list($pconfig['wins1'],$pconfig['wins2']) = $a_maps[$id]['winsserver']; |
111 |
list($pconfig['dns1'],$pconfig['dns2']) = $a_maps[$id]['dnsserver']; |
|
111 |
list($pconfig['dns1'],$pconfig['dns2'],$pconfig['dns3'],$pconfig['dns4']) = $a_maps[$id]['dnsserver'];
|
|
112 | 112 |
$pconfig['ddnsdomain'] = $a_maps[$id]['ddnsdomain']; |
113 | 113 |
$pconfig['ddnsdomainprimary'] = $a_maps[$id]['ddnsdomainprimary']; |
114 | 114 |
$pconfig['ddnsdomainkeyname'] = $a_maps[$id]['ddnsdomainkeyname']; |
... | ... | |
133 | 133 |
$pconfig['wins2'] = $_GET['wins2']; |
134 | 134 |
$pconfig['dns1'] = $_GET['dns1']; |
135 | 135 |
$pconfig['dns2'] = $_GET['dns2']; |
136 |
$pconfig['dns3'] = $_GET['dns3']; |
|
137 |
$pconfig['dns4'] = $_GET['dns4']; |
|
136 | 138 |
$pconfig['ddnsdomain'] = $_GET['ddnsdomain']; |
137 | 139 |
$pconfig['ddnsdomainprimary'] = $_GET['ddnsdomainprimary']; |
138 | 140 |
$pconfig['ddnsdomainkeyname'] = $_GET['ddnsdomainkeyname']; |
... | ... | |
229 | 231 |
if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['if'], $_POST['gateway'])) |
230 | 232 |
$input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']); |
231 | 233 |
} |
232 |
if (($_POST['dns1'] && !is_ipaddrv4($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddrv4($_POST['dns2']))) |
|
233 |
$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS servers.");
|
|
234 |
if (($_POST['dns1'] && !is_ipaddrv4($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddrv4($_POST['dns2'])) || ($_POST['dns3'] && !is_ipaddrv4($_POST['dns3'])) || ($_POST['dns4'] && !is_ipaddrv4($_POST['dns4'])))
|
|
235 |
$input_errors[] = gettext("A valid IP address must be specified for each of the DNS servers.");
|
|
234 | 236 |
|
235 | 237 |
if ($_POST['deftime'] && (!is_numeric($_POST['deftime']) || ($_POST['deftime'] < 60))) |
236 | 238 |
$input_errors[] = gettext("The default lease time must be at least 60 seconds."); |
... | ... | |
284 | 286 |
$mapent['dnsserver'][] = $_POST['dns1']; |
285 | 287 |
if ($_POST['dns2']) |
286 | 288 |
$mapent['dnsserver'][] = $_POST['dns2']; |
289 |
if ($_POST['dns3']) |
|
290 |
$mapent['dnsserver'][] = $_POST['dns3']; |
|
291 |
if ($_POST['dns4']) |
|
292 |
$mapent['dnsserver'][] = $_POST['dns4']; |
|
287 | 293 |
|
288 | 294 |
$mapent['gateway'] = $_POST['gateway']; |
289 | 295 |
$mapent['domain'] = $_POST['domain']; |
... | ... | |
439 | 445 |
<td width="78%" class="vtable"> |
440 | 446 |
<input name="dns1" type="text" class="formfld unknown" id="dns1" size="20" value="<?=htmlspecialchars($pconfig['dns1']);?>" /><br /> |
441 | 447 |
<input name="dns2" type="text" class="formfld unknown" id="dns2" size="20" value="<?=htmlspecialchars($pconfig['dns2']);?>" /><br /> |
448 |
<input name="dns3" type="text" class="formfld unknown" id="dns3" size="20" value="<?=htmlspecialchars($pconfig['dns3']);?>" /><br /> |
|
449 |
<input name="dns4" type="text" class="formfld unknown" id="dns4" size="20" value="<?=htmlspecialchars($pconfig['dns4']);?>" /><br /> |
|
442 | 450 |
<?=gettext("NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.");?> |
443 | 451 |
</td> |
444 | 452 |
</tr> |
Formats disponibles : Unified diff
Support up to 4 DNS Servers in DHCP