forked from extern/shorewall_code
Simplify ip_range slightly
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@645 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
2ec4e96fbd
commit
ceed25dc1c
@ -297,13 +297,13 @@ ip_range() {
|
||||
z=1
|
||||
|
||||
while [ $(( $first % $y )) -eq 0 -a $(( $first + $y )) -le $l ]; do
|
||||
vlsm=$x
|
||||
vlsm=/$x
|
||||
x=$(( $x - 1 ))
|
||||
z=$y
|
||||
y=$(( $y * 2 ))
|
||||
done
|
||||
|
||||
[ -n "$vlsm" ] && echo `encodeaddr $first`/$vlsm || echo `encodeaddr $first`
|
||||
echo `encodeaddr $first`$vlsm
|
||||
first=$(($first + $z))
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user