Changeset 246 for trunk


Ignore:
Timestamp:
05/18/05 15:36:14 (19 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix bug where assigning a static DSL block (or equivalent) starting
at .0 or ending at .255 (or both) would list .0 and .255 - which
do and can cause weirdness (respectively) if handed out via PPPoE.

File:
1 edited

Legend:

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

    r233 r246  
    425425    my @poolip_list = $pool->hostenum;
    426426    if ($class eq 'all') { # (DSL-ish block - *all* IPs available
    427       $sth->execute($pool->addr);
     427      if ($pool->addr !~ /\.0$/) {      # .0 causes weirdness.
     428        $sth->execute($pool->addr);
     429      }
    428430      for (my $i=0; $i<=$#poolip_list; $i++) {
    429431        $sth->execute($poolip_list[$i]->addr);
    430432      }
    431433      $pool--;
    432       $sth->execute($pool->addr);
     434      if ($pool->addr !~ /\.255$/) {    # .255 can cause weirdness.
     435        $sth->execute($pool->addr);
     436      }
    433437    } else { # (real netblock)
    434438      for (my $i=1; $i<=$#poolip_list; $i++) {
Note: See TracChangeset for help on using the changeset viewer.