Skip to content

Commit 8a77a74

Browse files
author
Marius Cramer
committed
Merge branch 'master' into 'master'
vm: use type AAAA for ipv6 in createDNS See merge request !220
2 parents 98d600f + 349272c commit 8a77a74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/lib/plugins/vm_openvz_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ private function createDNS() {
252252
"server_id" => $server_id,
253253
"zone" => $dns_soa_id,
254254
"name" => $hostname,
255-
"type" => 'A',
255+
"type" => @(preg_match("/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/", $ip_address))?'A':'AAAA',
256256
"data" => $ip_address,
257257
"aux" => '0',
258258
"ttl" => '3600',

0 commit comments

Comments
 (0)