Changeset 300


Ignore:
Timestamp:
11/16/05 18:01:10 (19 years ago)
Author:
Kris Deugau
Message:

/trunk

Tweaked code to make it more friendly to outside calls to create
allocations.
-> Check for allocfrom now only applies if it's defined
-> Static IPs do not have /32 tagged on (no need for it)
-> Core/WAN, routed DSL, server pools/statics, and DSL pools/statics

are all forced to "choose" Sudbury as the POP. This is how our
routing works, after all...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/main.cgi

    r299 r300  
    742742            " chose a smaller blocksize.";
    743743        }
    744         if ($webvar{allocfrom} ne '-') {
     744        if (defined $webvar{allocfrom} && $webvar{allocfrom} ne '-') {
    745745          $sql = "select cidr from freeblocks where city='$city' and maskbits<=$webvar{maskbits}".
    746746                " and cidr <<= '$webvar{allocfrom}' and routed='".
     
    847847  if ($code eq 'OK') {
    848848    if ($webvar{alloctype} =~ /^.i$/) {
     849      $msg =~ s|/32||;
    849850      print qq(<div class="center"><div class="heading">The IP $msg has been allocated to customer $webvar{custid}</div>).
    850851        ($webvar{alloctype} eq 'di' ?
     
    918919  } else {
    919920    $flag = 'n';
     921    if ($webvar{alloctype} =~ /[wp][cr]|[ds][pi]/) {
     922      # Set this forcibly rather than messing around elsewhere.  Yes, this *is* a hack.  PTHBTT!!
     923      $webvar{pop} = 'Sudbury';
     924    }
    920925    if ($webvar{pop} =~ /^-$/) {
    921926      $flag = 'to route the block from/through';
Note: See TracChangeset for help on using the changeset viewer.