Changeset 722 for trunk/cgi-bin
- Timestamp:
- 05/20/15 13:53:31 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r721 r722 155 155 sub _compactFree { 156 156 my $dbh = shift; 157 158 157 my $parent = shift; 159 158 160 159 # Rather than having the caller provide all the details 161 160 my $pinfo = getBlockData($dbh, $parent); 162 my $ftype = (split //, $pinfo->{type})[ 1];161 my $ftype = (split //, $pinfo->{type})[0]; 163 162 164 163 # NetAddr::IP->compact() attempts to produce the smallest inclusive block … … 201 200 202 201 # now we walk the new list of compacted blocks, and see which ones we need to insert 203 $sth = $dbh->prepare("INSERT INTO freeblocks (cidr,city,routed, parent_id,master_id) VALUES (?,?,?,?,?)");202 $sth = $dbh->prepare("INSERT INTO freeblocks (cidr,city,routed,vrf,parent_id,master_id) VALUES (?,?,?,?,?)"); 204 203 foreach my $cme (@combinelist) { 205 204 next if grep { $cme == $_ } @rawfb; # skip if the combined block was in the raw list 206 $sth->execute($cme, $pinfo->{city}, $ftype, $p arent, $pinfo->{master_id});205 $sth->execute($cme, $pinfo->{city}, $ftype, $pinfo->{vrf}, $parent, $pinfo->{master_id}); 207 206 } 208 207
Note:
See TracChangeset
for help on using the changeset viewer.