Discussion:
[Dnsmasq-discuss] bug: dhcp range parsing bug
Andrew White
2016-03-02 18:14:24 UTC
Permalink
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

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

This was not required in 2.65


Thanks


Andrew
Simon Kelley
2016-03-03 20:39:32 UTC
Permalink
Post by Andrew White
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
Post by Andrew White
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.
Post by Andrew White
This was not required in 2.65
Thanks
Andrew
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Andrew White
2016-03-03 23:33:44 UTC
Permalink
Thanks for the clarification and updating the man page too. I'll update my
configuration generating scripts.

Thanks again

Andrew
Post by Simon Kelley
Post by Andrew White
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
Post by Andrew White
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.
Post by Andrew White
This was not required in 2.65
Thanks
Andrew
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Loading...