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-Tag: v24.10.0-rc1~4134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e8bbd4265271612732c0804065ce8bf4939e8c0;p=thirdparty%2Fopenwrt.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 56854b41041..21f84bcaf2e 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