From f635f9c1d2180e02a50252e62eafa90a03569ef3 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Sun, 21 Feb 2010 21:41:37 -0500 Subject: [PATCH] Beatnik: Add IPv6 address support --- beatnik/lib/Beatnik.php | 24 ++++++++++++++++++++++++ beatnik/lib/Driver/ldap2dns.php | 1 + 2 files changed, 25 insertions(+) diff --git a/beatnik/lib/Beatnik.php b/beatnik/lib/Beatnik.php index 99166e127..58d356c3d 100644 --- a/beatnik/lib/Beatnik.php +++ b/beatnik/lib/Beatnik.php @@ -55,10 +55,13 @@ class Beatnik { */ function getRecTypes() { + global $beatnik; + $records = array( 'soa' => _("SOA (Start of Authority)"), 'ns' => _("NS (Name Server)"), 'a' => _("A (Address)"), + 'aaaa' => _("AAAA (IPv6 Address)"), 'ptr' => _("PTR (Reverse DNS)"), 'cname' => _("CNAME (Alias)"), 'mx' => _("MX (Mail eXchange)"), @@ -206,6 +209,27 @@ class Beatnik { ); break; + case 'aaaa': + $recset[$recordtype]['hostname'] = array( + 'name' => _("Hostname"), + 'description' => _("Short hostname for this record"), + 'type' => 'text', + 'maxlength' => 0, + 'required' => true, + 'infoset' => 'basic', + 'index' => 1, + ); + $recset[$recordtype]['ip6addr'] = array( + 'name' => _("IPv6 Address"), + 'description' => _("IPv6 Network Address"), + 'type' => 'ip6address', + 'maxlength' => 0, + 'required' => true, + 'infoset' => 'basic', + 'index' => 2, + ); + break; + case 'ptr': $recset[$recordtype]['hostname'] = array( 'name' => _("Hostname"), diff --git a/beatnik/lib/Driver/ldap2dns.php b/beatnik/lib/Driver/ldap2dns.php index a85d3ffaf..ddb4e56e5 100644 --- a/beatnik/lib/Driver/ldap2dns.php +++ b/beatnik/lib/Driver/ldap2dns.php @@ -202,6 +202,7 @@ class Beatnik_Driver_ldap2dns extends Beatnik_Driver 'timestamp' => 'dnstimestamp', 'location' => 'dnslocation', 'ipaddr' => 'dnsipaddr', + 'ip6addr' => 'dnsipaddr', 'cipaddr' => 'dnscipaddr', 'pointer' => 'dnscname', 'pref' => 'dnspreference', -- 2.11.0