• Michał Kępień's avatar
    Make dnstap work reliably with netmgr · 77dc0918
    Michał Kępień authored
    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.
server.c 413 KB