Project

General

Profile

« Previous | Next » 

Revision 534d7d69

Added by Joeri Capens over 7 years ago

Add DHCP Dynamic DNS key algorithm choice. Implements #6621

View differences:

src/etc/inc/services.inc
1169 1169
			if ($need_ddns_updates) {
1170 1170
				$newzone['dns-servers'] = array($dhcpifconf['ddnsdomainprimary']);
1171 1171
				$newzone['ddnsdomainkeyname'] = $dhcpifconf['ddnsdomainkeyname'];
1172
				$newzone['ddnsdomainkeyalgorithm'] = $dhcpifconf['ddnsdomainkeyalgorithm'];
1172 1173
				$newzone['ddnsdomainkey'] = $dhcpifconf['ddnsdomainkey'];
1173 1174
				$dhcpdconf .= dhcpdkey($dhcpifconf);
1174 1175
			}
......
1215 1216

  
1216 1217
function dhcpdkey($dhcpifconf) {
1217 1218
	$dhcpdconf = "";
1218
	if ($dhcpifconf['ddnsdomainkeyname'] <> "" && $dhcpifconf['ddnsdomainkey'] <> "") {
1219
	if ($dhcpifconf['ddnsdomainkeyname'] <> "" && $dhcpifconf['ddnsdomainkeyalgorithm'] <> "" && $dhcpifconf['ddnsdomainkey'] <> "") {
1219 1220
		$dhcpdconf .= "key {$dhcpifconf['ddnsdomainkeyname']} {\n";
1220
		$dhcpdconf .= "	algorithm hmac-md5;\n";
1221
		$dhcpdconf .= "	algorithm {$dhcpifconf['ddnsdomainkeyalgorithm']};\n";
1221 1222
		$dhcpdconf .= "	secret {$dhcpifconf['ddnsdomainkey']};\n";
1222 1223
		$dhcpdconf .= "}\n";
1223 1224
	}

Also available in: Unified diff