Ignore:
Timestamp:
11/02/12 16:17:29 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix minor IPv4-ism in admin allocate. See #22.

File:
1 edited

Legend:

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

    r542 r543  
    115115elsif ($webvar{action} eq 'alloc') {
    116116
    117   if ($webvar{cidr} !~ /^\s*(\d{1,3}\.){3}\d{1,3}(\/\d{2})?\s*$/) {
     117  my $cidr = new NetAddr::IP $webvar{cidr};
     118  if (!$cidr || "$cidr" =~ /^0/) {
    118119    $page->param(errmsg => "Can't allocate something that's not a netblock/ip");
    119120    goto ERRJUMP;
     
    145146  }
    146147
    147   my $cidr = new NetAddr::IP $webvar{cidr};
    148148  my @data;
    149149  if ($webvar{alloctype} eq 'rm') {
Note: See TracChangeset for help on using the changeset viewer.