aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-13 10:30:57 +0000
committerRoy Marples <roy@marples.name>2007-04-13 10:30:57 +0000
commiteabcb48f717c566832d93c79e04fe3bab1f381b1 (patch)
tree53575bc944cd3b57405ed47aca576c913307ad33
parenta07be0513af5181f3e2a57f9e313f4a08740c3f4 (diff)
netmask -> CIDR is worked out correctly #174341.
-rw-r--r--ChangeLog1
-rwxr-xr-xsh/net.sh2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e52ec02..968082d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
Fix module loading, #174360.
s-s-d now changes group when changing user, #174362.
+ netmask -> CIDR is worked out correctly #174341.
* baselayout-2.0.0_alpha1 (11 Apr 2007)
diff --git a/sh/net.sh b/sh/net.sh
index 3f62105b..33b93fcb 100755
--- a/sh/net.sh
+++ b/sh/net.sh
@@ -86,7 +86,7 @@ _netmask2cidr() {
local IFS=.
for i in $1; do
while [ ${i} != "0" ] ; do
- len=$((${len} + 1))
+ len=$((${len} + ${i} % 2))
i=$((${i} >> 1))
done
done