Changeset 831
- Timestamp:
- 04/08/16 15:35:32 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r820 r831 1812 1812 eval { 1813 1813 # have to insert all pool IPs into poolips table as "unallocated". 1814 $sth = $dbh->prepare("INSERT INTO poolips (ip,custid,city,type,parent_id,master_id ) VALUES (?,?,?,?,?,?)");1814 $sth = $dbh->prepare("INSERT INTO poolips (ip,custid,city,type,parent_id,master_id,vrf) VALUES (?,?,?,?,?,?,?)"); 1815 1815 1816 1816 # in case of pool extension by some means, we need to see what IPs were already inserted … … 1848 1848 my $baseip = $poolip_list[$i]->addr; 1849 1849 if ($baseip !~ /\.(?:0|255)$/ && !$foundips{$poolip_list[$i]}) { 1850 $sth->execute($baseip, $pcustid, $city, $type, $parent, $master );1850 $sth->execute($baseip, $pcustid, $city, $type, $parent, $master, $vrf); 1851 1851 } 1852 1852 } … … 1856 1856 if ($class eq 'all') { # (DSL-ish block - *all* IPs available 1857 1857 if ($pool->addr !~ /\.0$/) { # .0 causes weirdness. 1858 $sth->execute($pool->addr, $pcustid, $city, $type, $parent, $master) unless $foundips{$pool->addr."/32"}; 1859 } 1860 $sth->execute($poolip_list[0]->addr, $pcustid, $city, $type, $parent, $master) unless $foundips{$poolip_list[0]}; 1858 $sth->execute($pool->addr, $pcustid, $city, $type, $parent, $master, $vrf) 1859 unless $foundips{$pool->addr."/32"}; 1860 } 1861 $sth->execute($poolip_list[0]->addr, $pcustid, $city, $type, $parent, $master, $vrf) 1862 unless $foundips{$poolip_list[0]}; 1861 1863 $pool--; 1862 1864 if ($pool->addr !~ /\.255$/) { # .255 can cause weirdness. 1863 $sth->execute($pool->addr, $pcustid, $city, $type, $parent, $master) unless $foundips{$pool->addr."/32"}; 1865 $sth->execute($pool->addr, $pcustid, $city, $type, $parent, $master, $vrf) 1866 unless $foundips{$pool->addr."/32"}; 1864 1867 } 1865 1868 }
Note:
See TracChangeset
for help on using the changeset viewer.