Révision 3b5707db
Ajouté par Phil Davis il y a plus de 9 ans
usr/local/www/services_dhcp.php | ||
---|---|---|
181 | 181 |
$pconfig['domain'] = $dhcpdconf['domain']; |
182 | 182 |
$pconfig['domainsearchlist'] = $dhcpdconf['domainsearchlist']; |
183 | 183 |
list($pconfig['wins1'],$pconfig['wins2']) = $dhcpdconf['winsserver']; |
184 |
list($pconfig['dns1'],$pconfig['dns2']) = $dhcpdconf['dnsserver']; |
|
184 |
list($pconfig['dns1'],$pconfig['dns2'],$pconfig['dns3'],$pconfig['dns4']) = $dhcpdconf['dnsserver'];
|
|
185 | 185 |
$pconfig['denyunknown'] = isset($dhcpdconf['denyunknown']); |
186 | 186 |
$pconfig['ddnsdomain'] = $dhcpdconf['ddnsdomain']; |
187 | 187 |
$pconfig['ddnsdomainprimary'] = $dhcpdconf['ddnsdomainprimary']; |
... | ... | |
256 | 256 |
if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['if'], $_POST['gateway'])) |
257 | 257 |
$input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']); |
258 | 258 |
} |
259 |
if (($_POST['dns1'] && !is_ipaddrv4($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddrv4($_POST['dns2']))) |
|
260 |
$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS servers.");
|
|
259 |
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'])))
|
|
260 |
$input_errors[] = gettext("A valid IP address must be specified for each of the DNS servers.");
|
|
261 | 261 |
|
262 | 262 |
if ($_POST['deftime'] && (!is_numeric($_POST['deftime']) || ($_POST['deftime'] < 60))) |
263 | 263 |
$input_errors[] = gettext("The default lease time must be at least 60 seconds."); |
... | ... | |
475 | 475 |
$dhcpdconf['dnsserver'][] = $_POST['dns1']; |
476 | 476 |
if ($_POST['dns2']) |
477 | 477 |
$dhcpdconf['dnsserver'][] = $_POST['dns2']; |
478 |
if ($_POST['dns3']) |
|
479 |
$dhcpdconf['dnsserver'][] = $_POST['dns3']; |
|
480 |
if ($_POST['dns4']) |
|
481 |
$dhcpdconf['dnsserver'][] = $_POST['dns4']; |
|
478 | 482 |
|
479 | 483 |
$dhcpdconf['gateway'] = $_POST['gateway']; |
480 | 484 |
$dhcpdconf['domain'] = $_POST['domain']; |
... | ... | |
628 | 632 |
document.iform.wins2.disabled = endis; |
629 | 633 |
document.iform.dns1.disabled = endis; |
630 | 634 |
document.iform.dns2.disabled = endis; |
635 |
document.iform.dns3.disabled = endis; |
|
636 |
document.iform.dns4.disabled = endis; |
|
631 | 637 |
document.iform.deftime.disabled = endis; |
632 | 638 |
document.iform.maxtime.disabled = endis; |
633 | 639 |
document.iform.gateway.disabled = endis; |
... | ... | |
915 | 921 |
<td width="78%" class="vtable"> |
916 | 922 |
<input name="dns1" type="text" class="formfld unknown" id="dns1" size="20" value="<?=htmlspecialchars($pconfig['dns1']);?>" /><br /> |
917 | 923 |
<input name="dns2" type="text" class="formfld unknown" id="dns2" size="20" value="<?=htmlspecialchars($pconfig['dns2']);?>" /><br /> |
924 |
<input name="dns3" type="text" class="formfld unknown" id="dns3" size="20" value="<?=htmlspecialchars($pconfig['dns3']);?>" /><br /> |
|
925 |
<input name="dns4" type="text" class="formfld unknown" id="dns4" size="20" value="<?=htmlspecialchars($pconfig['dns4']);?>" /><br /> |
|
918 | 926 |
<?=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.");?> |
919 | 927 |
</td> |
920 | 928 |
</tr> |
Formats disponibles : Unified diff
Support up to 4 DNS Servers in DHCP