openwrt/package/network/services/dnsmasq/files
Yousong Zhou 0299a4b73e dnsmasq: skip options that are not compiled in
This is to make life easier for users with customized build of
dnsmasq-full variant.  Currently dnsmasq config generated by current
service script will be rejected by dnsmasq build lacking DHCP feature

 - Options like --dhcp-leasefile have default values.  Deleting them
   from uci config or setting them to empty value will make them take on
   default value in the end
 - Options like --dhcp-broadcast are output unconditionally

Tackle this by

 - Check availablility of features from output of "dnsmasq --version"
 - Make a list of options guarded by HAVE_xx macros in src/options.c of
   dnsmasq source code
 - Ignore these options in xappend()

Two things to note in this implementation

 - The option list is not exhaustive.  Supposedly only those options that
   may cause dnsmasq to reject with "unsupported option (check that
   dnsmasq was compiled with DHCP/TFTP/DNSSEC/DBus support)" are taken
   into account here
 - This provides a way out but users' cooperation is still needed.  E.g.
   option dnssec needs to be turned off, otherwise the service script
   will try to add --conf-file pointing to dnssec specific anchor file
   which dnsmasq lacking dnssec support will reject

Resolves FS#2281

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-06-09 08:17:52 +00:00
..
dhcp-script.sh dnsmasq: add dhcp-script hook for other packages 2017-05-26 21:28:30 +02:00
dhcp.conf dnsmasq: make bind-dynamic 'non-wildcard' interfaces default 2017-06-11 14:50:04 +02:00
dhcpbogushostname.conf dnsmasq: add dhcp-ignore-names support - CERT VU#598349 2018-10-09 09:45:16 +01:00
dnsmasq_acl.json dnsmasq: add ubus notifications for new leases 2017-08-22 21:31:39 +02:00
dnsmasq.conf packages: sort network related packages into package/network/ 2012-10-10 12:32:29 +00:00
dnsmasq.init dnsmasq: skip options that are not compiled in 2019-06-09 08:17:52 +00:00
dnsmasqsec.hotplug dnsmasq: use SIGINT for dnssec time valid 2018-01-15 22:34:51 +01:00
rfc6761.conf dnsmasq: remove example domains from rfc6761.conf (FS#1447) 2018-04-09 17:35:17 +02:00