dnsmasq: fix dnssec+ntp chicken-and-egg workaround (FS#2574)
authorHenrique de Moraes Holschuh <henrique@nic.br>
Sun, 1 Mar 2020 03:08:43 +0000 (00:08 -0300)
committerRISCi_ATOM <Bob@bobcall.me>
Tue, 28 Apr 2020 17:19:21 +0000 (13:19 -0400)
commit906a916780090f529006e66661ee79ad1a36501c
tree083a65a9a12466b8a47b83478f0a6aadcb272dca
parent3868b2cbb707276718c97f6dade1254e07690e9e
dnsmasq: fix dnssec+ntp chicken-and-egg workaround (FS#2574)

Fix the test for an enabled sysntp initscript in dnsmasq.init, and get
rid of "test -o" while at it.

Issue reproduced on openwrt-19.07 with the help of pool.ntp.br and an
RTC-less ath79 router.  dnssec-no-timecheck would be clearly missing
from /var/etc/dnsmasq.conf.* while the router was still a few days in
the past due to non-working DNSSEC + DNS-based NTP server config.

The fix was tested with the router in the "DNSSEC broken state": it
properly started dnsmasq in dnssec-no-timecheck mode, and eventually ntp
was able to resolve the server name to an IP address, and set the system
time.  DNSSEC was then enabled by SIGINT through the ntp hotplug hook,
as expected.

A missing system.ntp.enabled UCI node is required for the bug to show
up.  The reasons for why it would be missing in the first place were not
investigated.

Signed-off-by: Henrique de Moraes Holschuh <henrique@nic.br>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
(cherry picked from commit 556b8581a15c855b2de0efbea6b625ab16cc9daf)
package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/files/dnsmasq.init