base-files: ipcalc.sh: make check slightly more future-proof
authorLeon M. Busch-George <leon@georgemail.eu>
Wed, 20 Sep 2023 21:42:08 +0000 (23:42 +0200)
committerLeon M. Busch-George <leon@georgemail.eu>
Mon, 25 Sep 2023 13:02:49 +0000 (15:02 +0200)
The previous code handling the equal-condition might be removed or
altered in the future and the case might be overlooked.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
package/base-files/files/bin/ipcalc.sh

index 25114219a1065e12a600649843d3fa5e04094d5e..827cb5dc2ead717d9258dbba9e93841ffbdc5462 100755 (executable)
@@ -89,7 +89,7 @@ BEGIN {
                exit(1)
        }
 
-       if (ipaddr > start && ipaddr < end) {
+       if (ipaddr >= start && ipaddr <= end) {
                print "warning: ipaddr inside range - this might not be supported in future releases of Openwrt" > "/dev/stderr"
                # turn this into an error after Openwrt 24 has been released
                # exit(1)