[Dnsmasq-discuss] Fwd: Reg: Max Length if an entry

Simon Kelley simon at thekelleys.org.uk
Fri Jul 26 15:23:03 BST 2013


On 26/07/13 06:47, Nehal J. Wani wrote:
> I am implementing a public API in libvirt as part of my GSoC project, for
> which I need to parse the dnsmasq/<network-name>.leases file.
>
> I would like to know the maximum length that an entry can have in the
> leases file.
>

I think that the theoretical maximum length is probably unfeasibly 
large, since one field can hold a DHCPv6 DUID, which could be 2^16 
bytes, expressed in hex.

Being pragmatic, a quick look at the parsing code shows that if you 
allow 2048 characters, dnsmasq will break before you do :-)


Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list