201 |
201 |
$pconfig['netmask'] = $dhcpdconf['netmask'];
|
202 |
202 |
$pconfig['numberoptions'] = $dhcpdconf['numberoptions'];
|
203 |
203 |
$pconfig['statsgraph'] = $dhcpdconf['statsgraph'];
|
|
204 |
$pconfig['ddnsclientupdates'] = $dhcpdconf['ddnsclientupdates'];
|
204 |
205 |
}
|
205 |
206 |
|
206 |
207 |
$ifcfgip = $config['interfaces'][$if]['ipaddr'];
|
... | ... | |
585 |
586 |
$dhcpdconf['ddnsforcehostname'] = ($_POST['ddnsforcehostname']) ? true : false;
|
586 |
587 |
$dhcpdconf['mac_allow'] = $_POST['mac_allow'];
|
587 |
588 |
$dhcpdconf['mac_deny'] = $_POST['mac_deny'];
|
|
589 |
$dhcpdconf['ddnsclientupdates'] = $_POST['ddnsclientupdates'];
|
588 |
590 |
|
589 |
591 |
unset($dhcpdconf['ntpserver']);
|
590 |
592 |
if ($_POST['ntp1']) {
|
... | ... | |
1145 |
1147 |
$pconfig['ddnsdomainkey']
|
1146 |
1148 |
))->setHelp('Dynamic DNS domain key secret which will be used to register client names in the DNS server.');
|
1147 |
1149 |
|
|
1150 |
$section->addInput(new Form_Select(
|
|
1151 |
'ddnsclientupdates',
|
|
1152 |
'DDNS Client Updates',
|
|
1153 |
$pconfig['ddnsclientupdates'],
|
|
1154 |
array(
|
|
1155 |
'allow' => gettext('Allow'),
|
|
1156 |
'deny' => gettext('Deny'),
|
|
1157 |
'ignore' => gettext('Ignore'))
|
|
1158 |
))->setHelp('How Forward entries are handled when client indicates they wish to update DNS. ' .
|
|
1159 |
'Allow prevents DHCP from updating Forward entries, Deny indicates that DHCP will ' .
|
|
1160 |
'do the updates and the client should not, Ignore specifies that DHCP will do the ' .
|
|
1161 |
'update and the client can also attempt the update usually using a different domain name.');
|
|
1162 |
|
1148 |
1163 |
// Advanced MAC
|
1149 |
1164 |
$btnadv = new Form_Button(
|
1150 |
1165 |
'btnadvmac',
|
... | ... | |
1535 |
1550 |
// On page load decide the initial state based on the data.
|
1536 |
1551 |
if (ispageload) {
|
1537 |
1552 |
<?php
|
1538 |
|
if (!$pconfig['ddnsupdate'] && !$pconfig['ddnsforcehostname'] && empty($pconfig['ddnsdomain']) && empty($pconfig['ddnsdomainprimary']) &&
|
1539 |
|
empty($pconfig['ddnsdomainkeyname']) && empty($pconfig['ddnsdomainkeyalgorithm']) && empty($pconfig['ddnsdomainkey'])) {
|
|
1553 |
if (!$pconfig['ddnsupdate'] &&
|
|
1554 |
!$pconfig['ddnsforcehostname'] &&
|
|
1555 |
empty($pconfig['ddnsdomain']) &&
|
|
1556 |
empty($pconfig['ddnsdomainprimary']) &&
|
|
1557 |
empty($pconfig['ddnsdomainkeyname']) &&
|
|
1558 |
empty($pconfig['ddnsdomainkeyalgorithm']) &&
|
|
1559 |
(empty($pconfig['ddnsclientupdates']) || ($pconfig['ddnsclientupdates'] == "allow")) &&
|
|
1560 |
empty($pconfig['ddnsdomainkey'])) {
|
1540 |
1561 |
$showadv = false;
|
1541 |
1562 |
} else {
|
1542 |
1563 |
$showadv = true;
|
... | ... | |
1555 |
1576 |
hideInput('ddnsdomainkeyname', !showadvdns);
|
1556 |
1577 |
hideInput('ddnsdomainkeyalgorithm', !showadvdns);
|
1557 |
1578 |
hideInput('ddnsdomainkey', !showadvdns);
|
|
1579 |
hideInput('ddnsclientupdates', !showadvdns);
|
1558 |
1580 |
|
1559 |
1581 |
if (showadvdns) {
|
1560 |
1582 |
text = "<?=gettext('Hide Advanced');?>";
|
Add DDNS client update option to DHCPv4 configuraiton