[Dnsmasq-discuss] bug: dhcp range parsing bug

Simon Kelley simon at thekelleys.org.uk
Thu Mar 3 20:39:32 GMT 2016


On 02/03/16 18:14, Andrew White wrote:
> Hi,
> 
> version > 2.65 introduced a bug where this command gives "bad dhcp-range"
> 
> ./src/dnsmasq -F dhcp-range=set:tag1,192.168.1.1,192.168.1.254,static


This was always wrong, so complaining about it is correct. The "static"
flag _replaces_ the second IP address, as a range is not required when
only static addresses are allowed, so it should be

./src/dnsmasq -F dhcp-range=set:tag1,192.168.1.1,static
> 
> due to how the parsing of options were changed.
> adding the subnetmask appears to work around it.
> 
> ./src/dnsmasq -F
> dhcp-range=set:tag1,192.168.1.1,192.168.1.254,static,255.255.255.0

That's accepted, but it shouldn't be and it's not parsed as anything
like you're expecting, so that is a bug.

I've just pushed a fix to this to git, also I fixed the BNF in the man
page, which was at best misleading, and probably plain wrong.



Cheers,

Simon.


> 
> This was not required in 2.65
> 
> 
> Thanks
> 
> 
> Andrew
> 
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list