diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc
index 8694ee49a..813234f0f 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -950,6 +950,7 @@ EOD;
$newzone['dns-servers'] = array($dhcpifconf['ddnsdomainprimary']);
$newzone['ddnsdomainkeyname'] = $dhcpifconf['ddnsdomainkeyname'];
$newzone['ddnsdomainkey'] = $dhcpifconf['ddnsdomainkey'];
+ $newzone['ddnsdomainalgorithm'] = !empty($dhcpifconf['ddnsdomainalgorithm']) ? $dhcpifconf['ddnsdomainalgorithm'] : "hmac-md5";
$ddns_zones[] = $newzone;
}
}
@@ -1012,7 +1013,7 @@ function services_dhcpd_zones($ddns_zones)
if (!empty($zone['ddnsdomainkeyname']) && !empty($zone['ddnsdomainkey'])) {
if (!in_array($zone['ddnsdomainkeyname'], $added_keys)) {
$dhcpdconf .= "key {$zone['ddnsdomainkeyname']} {\n";
- $dhcpdconf .= " algorithm hmac-md5;\n";
+ $dhcpdconf .= " algorithm {$zone['ddnsdomainalgorithm']};\n";
$dhcpdconf .= " secret {$zone['ddnsdomainkey']};\n";
$dhcpdconf .= "}\n";
$added_keys[] = $zone['ddnsdomainkeyname'];
diff --git a/src/www/services_dhcp.php b/src/www/services_dhcp.php
index 782a3fcb2..5477badd3 100644
--- a/src/www/services_dhcp.php
+++ b/src/www/services_dhcp.php
@@ -96,7 +96,7 @@ function reconfigure_dhcpd()
$config_copy_fieldsnames = array('enable', 'staticarp', 'failover_peerip', 'dhcpleaseinlocaltime','descr',
'defaultleasetime', 'maxleasetime', 'gateway', 'domain', 'domainsearchlist', 'denyunknown', 'ddnsdomain',
- 'ddnsdomainprimary', 'ddnsdomainkeyname', 'ddnsdomainkey', 'ddnsupdate', 'mac_allow', 'mac_deny', 'tftp', 'ldap',
+ 'ddnsdomainprimary', 'ddnsdomainkeyname', 'ddnsdomainkey', 'ddnsdomainalgorithm', 'ddnsupdate', 'mac_allow', 'mac_deny', 'tftp', 'ldap',
'netboot', 'nextserver', 'filename', 'filename32', 'filename64', 'rootpath', 'netmask', 'numberoptions',
'interface_mtu', 'wpad');
@@ -885,6 +885,20 @@ include("head.inc");
=gettext("Enter the dynamic DNS domain key secret which will be used to register client names in the DNS server.");?>
+ =gettext("Choose the dynamic DNS domain key algorithm.");?>
+