Commit cdd7bc1
committed
fix(dnsmasq): make --conf-poll actually wake the loop periodically
poll_dynamic_dirs() was only ever invoked opportunistically, whenever
something else (a DNS/DHCP packet, an inotify event, a signal) already
woke up dnsmasq's main loop. With no such activity, the loop's
do_poll() blocks indefinitely, so on a quiet dnsmasq instance the
poller never actually ran on its own, no matter how long
--conf-poll-interval was set to.
conf-poll.patch now also clamps the loop's wait timeout to
--conf-poll-interval when --conf-poll is set, the same way TFTP/DBus/
DAD already force more frequent wake-ups.
Reproduced against a live pod (dhcp-hostsdir file created from a
different host, dnsmasq never picked it up despite --conf-poll being
set) and verified the fix by running dnsmasq with --conf-poll, no
upstream DNS servers and no DHCP traffic (so nothing else would ever
wake the loop), then confirming a new dhcp-hostsdir file is picked up
within ~1s with zero other interaction with the process.1 parent f62f217 commit cdd7bc1
1 file changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
| |||
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
57 | | - | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
73 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
74 | 99 | | |
75 | 100 | | |
76 | 101 | | |
| |||
0 commit comments