#3239 net-lib error converting prefix to netmask (8 to 16 bit)

Other
closed-fixed
5
2008-11-13
2008-11-13
Anonymous
No

The problem only affects to masks from 8 to 16 bits.

The function prefix_to_mask() seems to have a writing typo in a conditional sentence.

The simple patch:

--- net-lib.pl.old 2008-11-13 17:20:45.000000000 +0100
+++ net-lib.pl 2008-11-13 17:20:58.000000000 +0100
@@ -147,7 +147,7 @@
{
return $_[0] >= 24 ? "255.255.255.".(256-(2 ** (32-$_[0]))) :
$_[0] >= 16 ? "255.255.".(256-(2 ** (24-$_[0]))).".0" :
- $_[0] >= 16 ? "255.".(256-(2 ** (16-$_[0]))).".0.0" :
+ $_[0] >= 8 ? "255.".(256-(2 ** (16-$_[0]))).".0.0" :
(256-(2 ** (8-$_[0]))).".0.0.0";

}

Our webmin version is 1.441

Discussion

  • Jamie Cameron

    Jamie Cameron - 2008-11-13

    Doh! I will include this fix in the next Webmin release..

     
  • Jamie Cameron

    Jamie Cameron - 2008-11-13
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks