[Dnsmasq-discuss] [BUG] Logged IDs incorrect
Dominik Derigs
dl6er at dl6er.de
Sat Oct 16 11:57:49 UTC 2021
Hey Simon,
We received reports that the IDs of some log lines can be
incorrect ("log-queries=extra" is enabled).
I attach three representative log snippets that highlight the
issue (comments therein). Logs 1 and 2 seem to have the same
reason. I'd have provided a patch but I'm not sure about the
exact code path in this case: How is the query "forwarded ... to"
without a "query[A] ... from ..." line?
Be that as it may, even when I'm unable to reproduce this myself,
the source of the wrong IDs seems to be in forward_query():
> /* If a query is retried, use the log_id for the retry when
> logging the answer. */
> forward->frec_src.log_id = daemon->log_id;
The issue seems clear: When dnsmasq retries the queries itself
(i.e. without a corresponding "query[...]" line in the log),
daemon->log_id still points to the previous (entirely unrelated)
query. Setting the ID is incorrect at this point.
The third log is somewhat different, it may be a separate issue.
I cannot reproduce the issue in the first two logs but I can pass
on a patch.
Best,
Dominik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.log
Type: text/x-log
Size: 1684 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20211016/5f43ca21/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.log
Type: text/x-log
Size: 3689 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20211016/5f43ca21/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3.log
Type: text/x-log
Size: 1345 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20211016/5f43ca21/attachment-0002.bin>
More information about the Dnsmasq-discuss
mailing list