Index: trunk/cgi-bin/IPDB.pm
===================================================================
--- trunk/cgi-bin/IPDB.pm	(revision 874)
+++ trunk/cgi-bin/IPDB.pm	(revision 875)
@@ -267,8 +267,8 @@
   my $inssth = $dbh->prepare(q{
       INSERT INTO poolips (
-          ip,type,parent_id,available,
+          ip,type,parent_id,master_id,available,
           city,description,notes,circuitid,createstamp,modifystamp,privdata,custid,vrf,vlan,rdns
           )
-      VALUES (?,?,?,'n',?,?,?,?,?,?,?,?,?,?,?)
+      VALUES (?,?,?,?,'n',?,?,?,?,?,?,?,?,?,?,?)
     });
   my $updsth = $dbh->prepare("UPDATE poolips SET parent_id = ?, type = ? WHERE parent_id = ?");
@@ -296,5 +296,5 @@
           next if $newip->addr eq $gw->addr;
         }
-        $inssth->execute($newip, $newtype, $poolparent, @oldalloc) if !$poolcounter{"$newip"};
+        $inssth->execute($newip, $newtype, $poolparent, $master, @oldalloc) if !$poolcounter{"$newip"};
         $poolcounter{"$newip"}++;
       }
