Index: /trunk/cgi-bin/main.cgi
===================================================================
--- /trunk/cgi-bin/main.cgi	(revision 888)
+++ /trunk/cgi-bin/main.cgi	(revision 889)
@@ -706,9 +706,10 @@
       if ($cidr->masklen() ne $webvar{maskbits}) {
         my $maskbits = $cidr->masklen();
-        my @subblocks;
+        # we reset $cidr each time around the loop to better allow for the huge
+        # address space of IPv6;  many allocation schemes in v6 will break NetAddr::IP's
+        # hard limit of 65536 subnets from a split()
         while ($maskbits++ < $webvar{maskbits}) {
-          @subblocks = $cidr->split($maskbits);
+          $cidr = ($cidr->split($maskbits))[0];
         }
-        $cidr = $subblocks[0];
       }
     } # check for freeblocks assignment or IPDB-controlled assignment
