From: Leon M. Busch-George Date: Fri, 16 Jun 2023 12:53:09 +0000 (+0200) Subject: base-files: ipcalc.sh: correctly interpret num parameter X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9e8bbd4265271612732c0804065ce8bf4939e8c0;p=openwrt%2Fstaging%2Fthess.git 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 --- diff --git a/package/base-files/files/bin/ipcalc.sh b/package/base-files/files/bin/ipcalc.sh index 56854b4104..21f84bcaf2 100755 --- a/package/base-files/files/bin/ipcalc.sh +++ b/package/base-files/files/bin/ipcalc.sh @@ -69,7 +69,7 @@ BEGIN { if (startlimit) end=limit if (end==ipaddr) end=ipaddr-1