mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-20 17:32:57 +00:00
base-files: ipcalc.sh: correctly interpret num parameter
The start and end addresses are inclusive. Thus, adding num without substracting one results in num + 1 addresses. Add the substraction and to implement the documented behaviour. Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
This commit is contained in:
parent
6585498372
commit
9e8bbd4265
@ -69,7 +69,7 @@ BEGIN {
|
||||
if (start<limit) start=limit
|
||||
if (start==ipaddr) start=ipaddr+1
|
||||
|
||||
end=start+ARGV[4]
|
||||
end=start+ARGV[4]-1
|
||||
limit=or(network,compl32(netmask))-1
|
||||
if (end>limit) end=limit
|
||||
if (end==ipaddr) end=ipaddr-1
|
||||
|
Loading…
x
Reference in New Issue
Block a user