projects
/
openwrt
/
staging
/
neocturne.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5c095c
)
base-files: fix ipcalc bound calculation for /31 prefix
author
Leon M. Busch-George
<
[email protected]
>
Thu, 9 May 2024 09:32:26 +0000
(11:32 +0200)
committer
Christian Marangi
<
[email protected]
>
Mon, 17 Jun 2024 11:45:37 +0000
(13:45 +0200)
A small regress from the translation to shell.
Fixes #12921, originally fixed in #12925 (Github).
Signed-off-by: Leon M. Busch-George <
[email protected]
>
Link:
https://github.com/openwrt/openwrt/pull/15430
Signed-off-by: Christian Marangi <
[email protected]
>
package/base-files/files/bin/ipcalc.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/bin/ipcalc.sh
b/package/base-files/files/bin/ipcalc.sh
index 9e2702c60d2216cf365d05c7e500266fe3298201..ae7a5c9598814f37cd487c4f240ee6ad0a717d6a 100755
(executable)
--- a/
package/base-files/files/bin/ipcalc.sh
+++ b/
package/base-files/files/bin/ipcalc.sh
@@
-111,6
+111,8
@@
start=$((network | (start & hostmask)))
if [ "$prefix" -le 30 ]; then
upper=$(((network | hostmask) - 1))
+elif [ "$prefix" -eq 31 ]; then
+ upper=$((network | hostmask))
else
upper="$network"
fi