[Dnsmasq-discuss] /etc/hosts char length limit bug

Tim Tassonis stuff at decentral.ch
Mon Jun 8 13:37:42 UTC 2026



On 6/3/26 23:39, brandon via Dnsmasq-discuss wrote:
> Hello DNS Masq,
> 
> While using dnsmasq as part of libvirt I've noticed that my /etc/hosts 
> prevents my VMs from starting. I looked through the system logs and 
> found that it was DNS Masq that was crashing causing my VMs to not have 
> any network (not even DHCP or any ip connectivity).
> 
> I'm using NixOS and using StevenBlack hosts to block ads on my system.
> 
> I sorted /etc/hosts lines by length and then performed a binary search 
> to cut down the longest lines one by one.
> 
> What I found was that once the lines get to <=57 chars dnsmasq is able 
> to start with no problems.
> 
> Please see my change log here for what I've done on my system:
> https://github.com/StevenBlack/hosts/compare/ 
> master...yuannan:hosts:short <https://github.com/StevenBlack/hosts/ 
> compare/master...yuannan:hosts:short>



Why do you deliberately and repeatedly misspell dnsmasq as DNS Masq?





More information about the Dnsmasq-discuss mailing list