]> git.ipfire.org Git - thirdparty/bind9.git/commit
Make dnstap work reliably with netmgr
authorMichał Kępień <michal@isc.org>
Mon, 27 Apr 2020 05:46:01 +0000 (07:46 +0200)
committerOndřej Surý <ondrej@sury.org>
Fri, 1 May 2020 12:15:41 +0000 (14:15 +0200)
commit77dc091855fa106ecb3197618f40561c09b9976c
tree733b3d62729c0b1a971131c1c501bf53052b93af
parent96959447c307f7910f8cb17941b0aecbb7e49b3c
Make dnstap work reliably with netmgr

The introduction of netmgr doubled the number of threads from which
dnstap data may be logged: previously, it could only happen from within
taskmgr worker threads; with netmgr, it can happen both from taskmgr
worker threads and from network threads.  Since the argument passed to
fstrm_iothr_options_set_num_input_queues() was not updated to reflect
this change, some calls to fstrm_iothr_get_input_queue() can now return
NULL, effectively preventing some dnstap data from being logged.
Whether this bug is triggered or not depends on thread scheduling order
and packet distribution between network threads, but will almost
certainly be triggered on any recursive resolver sooner or later.  Fix
by requesting the correct number of dnstap input queues to be allocated.
bin/named/server.c
bin/tests/system/dnstap/ns3/named.args [new file with mode: 0644]
util/copyrights