From eabcb48f717c566832d93c79e04fe3bab1f381b1 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 13 Apr 2007 10:30:57 +0000 Subject: netmask -> CIDR is worked out correctly #174341. --- sh/net.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sh/net.sh') 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 -- cgit v1.2.3