Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#7678 closed defect (worksforme)

/etc/config/dhcp '"dnsmasq" section, option "server" doesn't work as intended

Reported by: anonymous Owned by: developers
Priority: high Milestone: Backfire 10.03.1
Component: base system Version: Backfire 10.03
Keywords: dhcp dnsmasq server dns Cc:


i'm trying to define upstream nameservers statically by specifying them in the commandline when invoking dnsmasq. i found in the docs that the option "server" may be used to do so. i'm also aware that dnsmasq polls /tmp/ unless "noresolv" option is set so that it only reads upstream nameservers in the commandline or in dnsmasq.conf file. unfortunately this doesn't take effect after reboot as can be verified by the lack of name resolution when pinging within the router and as indicated in the syslog entries.

the entry in the dhcp config file, to wit:
option 'server' ' yyy.yyy.yyy.yyy'

as a workaround, i've set the nameservers using dnsmasq.conf as follows:

the script /etc/init.d/dnsmasq that's responsible for generating commandline params for dnsmasq must not be correctly appending the server list as indicated in the option, which must be "-S -S yyy.yyy.yyy.yyy". i have no way of verifying at runtime because "ps" doesn't seem to support args specifying listing the full commandline when viewing processes. i have left all other options in the dnsmasq section at defaults.

a quick note: i'm aware of the dnsmasq man page that the "server" option can take domains as well, specifying which nameservers should answer what domain, such as in the form "-S /domain/". i'm not sure if setting this in the "server" option as:

option 'server' '/domain/ yyy.yyy.yyy.yyy'

would still be correct, assuming it works. if it would then it should also be supported by the config file to have such definition, since it provides the facility to generate the "-S" commandline option. this could be a versatile feature to have.

thanks for releasing a great open-source project and alternative firmware.

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by anonymous

correction on dnsmasq.conf lines should be:

but the newline didn't show up at first.

comment:2 follow-up: Changed 8 years ago by jow

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

You're supposed to use the list syntax.

list server
list server yyy.yyy.yyy.yyy
list server zzz.zzz.zzz.zzz

comment:3 in reply to: ↑ 2 Changed 8 years ago by anonymous

Replying to jow:

You're supposed to use the list syntax.

list server
list server yyy.yyy.yyy.yyy
list server zzz.zzz.zzz.zzz

thanks for the clarification. the documentation can sometimes be confusing, wherein /etc/config/network "dns" option is of type "list of ip addresses" but is formatted as option 'dns' ' yyy.yyy.yyy.yyy'. so i assumed the "server" option that is of type "list of strings" would follow the same.

comment:4 Changed 6 years ago by anonymous

To see "full" commandline arguments in linux, try something like:
cat /proc/pidof dnsmasq/cmdline

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.