dnsmasq: add uci option fail_unknown dnsmasq-fail_unknown
authorYousong Zhou <yszhou4tech@gmail.com>
Fri, 25 Sep 2020 12:22:26 +0000 (20:22 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Fri, 25 Sep 2020 12:22:26 +0000 (20:22 +0800)
commit7740a1ebfd32509200ca37ef7c857bf5927f3bf1
tree87c5e7e4eb38969447ba51856b23d6943a935313
parent7dc78d1d2893b672544e8c26026ce961a7248a82
dnsmasq: add uci option fail_unknown

In 0299a4b73e72 ("dnsmasq: skip options that are not compiled in"), the
init script was changed to silently ignore and move on before presenting
unknown/unsupported options to dnsmasq

It was so to accomodate the situation where the init script will try to
emit some options unconditionally for a custom build of dnsmasq lacking
it.  We allow custom build in the Makefile, we should allow it be used
with the uci and init script code

However the "silently ignore and move on" part raises security concern
for options like "dnssec".  When uci option "dnssec" option is on, we
should interpret that as an explicit request and fail if the build is
not capable of handling it.

Add a new uci option "fail_unknown".  It defaults to on, meaning a
behavior change from the old "silently ignore".

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
package/network/services/dnsmasq/files/dnsmasq.init