Changeset 333


Ignore:
Timestamp:
04/13/06 17:37:40 (19 years ago)
Author:
Kris Deugau
Message:

/branches/stable

snCalc.cgi seems to have been mildly broken at some point. Fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/snCalc.cgi

    r4 r333  
    1616print $start;
    1717
    18 if($webvar{input} =~ m/(\/\d\d)/)
     18if($webvar{input} =~ m/(\d\d)/)
    1919{
    20         $input = $1;
     20        $input = 1*$1;
    2121}
    2222else
    2323{
    24         $input = '/29';
     24        $input = 29;
    2525}
    2626
    27 if(substr($input, 1, 2) > 32 || substr($input, 1, 2) < 24)
     27if ($input > 32 || $input < 24)
    2828{
    29         printAndExit("'$input' is an invalid netmask.");
     29        printAndExit("Don't know what to do with '$input' as a masklength.");
    3030}
    3131else
    32 {               $input = substr($input, 1, 2);
     32{               
    3333                my $ltinput = $input -1;
    3434                my $gtinput = $input +1;
    35                
    3635                print qq(       <div class="center">
    3736                <table align="center" cellspacing="3" cellpadding="3"><tr>
Note: See TracChangeset for help on using the changeset viewer.