Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#7315 closed defect (wontfix)

dnsmasq command line options truncated

Reported by: jkrzyszt@… Owned by: developers
Priority: normal Milestone: Backfire 10.03.1
Component: base system Version: Backfire 10.03
Keywords: Cc:



After ethers and hosts entries have been migrated from files to dnsmasq command line, it may happen that a part of dnsmasq options may be truncated if there are too many of them.


Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by jow

On pre-2.6.23 kernels the size of all arguments is limited to 128 kilobytes, assuming an average argument size of 20 bytes, this would allow for ~6500 command line arguments.

Recent kernels are limited to a quarter of the available stack space when handling arguments for the exec syscall. If you manage to exceed this limits with static dhcp and host entries, you should consider more advanced dhcp or dns server software.

comment:2 Changed 7 years ago by nico

  • Resolution set to wontfix
  • Status changed from new to closed

comment:3 Changed 7 years ago by umiki at

Also there is nothing stopping you from using ethers and hosts in these special cases (dnsmasq still reads these files at startup)

comment:4 Changed 7 years ago by Janusz Krzysztofik <jkrzyszt@…>

First of all, sorry for not responding on time, I must have missed jow's initial comment.

FYI, my now working dnsmasq command line, that containes all my --dhcp-host options, consists of 1490 characters. What I had to remove from there (and from the /etc/conf/dhcp) to work around the problem, were 42 IP host declarations, now sitting back in my /etc/hosts.

Are you sure this is really too much, so I should really follow your advice and use a more powerfull dhcp or dns server? Are you sure no users can have similiar or higher number of entries? If I were you, I wouldn't be so sure, and expect more problem reports sooner or later.

Apart from this, if you close a bug, I would expect to learn why you choose to do things one way, and not the other. Can you point me to a discussion on this particular matter? If not, can you explain what was the rationale for your init script putting all configuration entries into command line options instead of dynamically creating a few runtime data files (addn-hosts, dhcp-hostsfile, dhcp-optsfile), which solution seems free of any size limits? After all, if dnsmasq developers have provided us with such possibilities, why not using them?

Regarding a suggestion on using ethers and hosts: yes, my dns data were sitting in /etc/hosts until I upgraded to Backfire. Your upgrade script moved those data to /etc/config/dhcp and wiped out the source, creating a broken dnsmask configuration as a result. I don't like it, do you?

If you are going to leave things as they are now, please at least warn your users about potential troubles they may fall into on upgrade.


Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.