diff options
| author | Leon M. Busch-George | 2024-05-09 09:32:26 +0000 |
|---|---|---|
| committer | Christian Marangi | 2024-06-17 11:45:37 +0000 |
| commit | bff0e1cfd87374ae0994ea57f8b8b8f14d8d9f38 (patch) | |
| tree | c47511d561e82f0638ef182488830ac8daec4264 | |
| parent | a5c095c4534dcbc09acc7e6d106dc911149c87ae (diff) | |
| download | openwrt-bff0e1cfd87374ae0994ea57f8b8b8f14d8d9f38.tar.gz | |
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>
| -rwxr-xr-x | package/base-files/files/bin/ipcalc.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/package/base-files/files/bin/ipcalc.sh b/package/base-files/files/bin/ipcalc.sh index 9e2702c60d..ae7a5c9598 100755 --- 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 |