aboutsummaryrefslogtreecommitdiff
path: root/sh/net.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/net.sh')
-rwxr-xr-xsh/net.sh2
1 files changed, 1 insertions, 1 deletions
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