mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
base-files: fix ipcalc bound calculation for /31 prefix
A small regress from the translation to shell. Fixes #12921, originally fixed in #12925 (Github). Signed-off-by: Leon M. Busch-George <leon@georgemail.eu> Link: https://github.com/openwrt/openwrt/pull/15430 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
a5c095c453
commit
bff0e1cfd8
@ -111,6 +111,8 @@ start=$((network | (start & hostmask)))
|
|||||||
|
|
||||||
if [ "$prefix" -le 30 ]; then
|
if [ "$prefix" -le 30 ]; then
|
||||||
upper=$(((network | hostmask) - 1))
|
upper=$(((network | hostmask) - 1))
|
||||||
|
elif [ "$prefix" -eq 31 ]; then
|
||||||
|
upper=$((network | hostmask))
|
||||||
else
|
else
|
||||||
upper="$network"
|
upper="$network"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user