package: dnsmasq: remove off-by-one mitigation for limit
authorLeon M. Busch-George <leon@georgemail.eu>
Fri, 16 Jun 2023 13:12:18 +0000 (15:12 +0200)
committerLeon M. Busch-George <leon@georgemail.eu>
Mon, 25 Sep 2023 13:02:49 +0000 (15:02 +0200)
In the dnsmasq init script, an off-by-one in the range calculation of
ipcalc.sh was mitigated by passing the limit as if its counting started
at zero. This patch removes the mitigation as the off-by-one has been
fixed.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/files/dnsmasq.init

index 54b95d414deea7db2712fbb42f9a1fab5d8ede56..e442d0005b90e99a490dcdeea98358e3ea3b0134 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=dnsmasq
 PKG_UPSTREAM_VERSION:=2.89
 PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
 PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/
index 184e7ff0ed571b62bde2a1268fb3b74a9420e7c6..af5ca5822ea8a615dfe073ee6684ccfb5d748c67 100755 (executable)
@@ -583,10 +583,6 @@ dhcp_add() {
 
        nettag="${networkid:+set:${networkid},}"
 
-       if [ "$limit" -gt 0 ] ; then
-               limit=$((limit-1))
-       fi
-
        # make sure the DHCP range is not empty
        if [ "$dhcpv4" != "disabled" ] && ipcalc "${subnet%%/*}" "$netmask" "$start" "$limit" ; then
                [ "$dynamicdhcpv4" = "0" ] && END="static"