Changeset 831 for trunk


Ignore:
Timestamp:
04/08/16 15:35:32 (8 years ago)
Author:
Kris Deugau
Message:

/trunk

Fill in VRF when generating poolips entries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/IPDB.pm

    r820 r831  
    18121812  eval {
    18131813    # 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 (?,?,?,?,?,?,?)");
    18151815
    18161816    # in case of pool extension by some means, we need to see what IPs were already inserted
     
    18481848      my $baseip = $poolip_list[$i]->addr;
    18491849      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);
    18511851      }
    18521852    }
     
    18561856    if ($class eq 'all') { # (DSL-ish block - *all* IPs available
    18571857      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]};
    18611863      $pool--;
    18621864      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"};
    18641867      }
    18651868    }
Note: See TracChangeset for help on using the changeset viewer.