mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Fix bug in converting /12 addresses to netmasks https://github.com/webmin/webmin/issues/1292
This commit is contained in:
@@ -1618,7 +1618,7 @@ sub prefix_to_mask
|
||||
{
|
||||
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";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user