Beatnik: Add IPv6 address support
authorBen Klang <ben@alkaloid.net>
Mon, 22 Feb 2010 02:41:37 +0000 (21:41 -0500)
committerBen Klang <ben@alkaloid.net>
Mon, 22 Feb 2010 02:41:37 +0000 (21:41 -0500)
beatnik/lib/Beatnik.php
beatnik/lib/Driver/ldap2dns.php

index 99166e1..58d356c 100644 (file)
@@ -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"),
index a85d3ff..ddb4e56 100644 (file)
@@ -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',