#18110: dnsmasq and ipcalc.sh range mismatch (off by one)
--------------------------------+------------------------
 Reporter:  anonymous           |      Owner:  developers
     Type:  defect              |     Status:  new
 Priority:  normal              |  Milestone:
Component:  packages            |    Version:  Trunk
 Keywords:  dnsmasq, ipcalc.sh  |
--------------------------------+------------------------
 While testing. I noticed a mismatch between the IP range written in
 /tmp/etc/dnsmasq.conf (which ends at 10.177.31.253) and the one calculated
 by ipcalc.sh (which ends at 10.177.31.254)

 {{{
 root@OpenWrt:/etc/config# ipcalc.sh 10.177.0.1 19 129 8061
 IP=10.177.0.1
 NETMASK=255.255.224.0
 BROADCAST=10.177.31.255
 NETWORK=10.177.0.0
 PREFIX=19
 START=10.177.0.129
 END=10.177.31.254
 }}}

 Yet when configuring dhcp
 {{{
 root@OpenWrt:/etc/config# cat dhcp
 ...
 config dhcp 'lan5'
         option interface 'lan5'
         option start '129'
         option limit '8061'
         option leasetime '1h'
 ...
 }}}

 the resulting dnsmasq config file:

 {{{
 root@OpenWrt:/etc/config# cat /tmp/etc/dnsmasq.conf
 ...
 dhcp-range=lan5,10.177.0.129,10.177.31.253,255.255.224.0,1h
 }}}

 the IP range in /tmp/etc/dnsmasq.conf ends at 10.177.31.253 instead of
 10.177.31.254 as calculated by ipcalc.sh

--
Ticket URL: <https://dev.openwrt.org/ticket/18110>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to