dt_message_fill() should fill either query_time_* or response_time_*, not both
There's no real need for Knot to set both the query_time_[n]sec
and response_time_[n]sec
pairs of dnstap fields in a given dnstap payload. For *_QUERY
dnstap messages, only the query_time_[n]sec
fields should be set, and for *_RESPONSE
dnstap messages only the response_time_[n]sec
fields should be set. This will make Knot's dnstap payloads a few percent smaller and should be equivalent to how other DNS servers generate dnstap payloads.
This is a little bit underdocumented here: https://github.com/dnstap/dnstap.pb/blob/2d8098aaef53e548e3808f757e48acc51c37b6c9/dnstap.proto#L231-L242. But, that's how I intended how the timestamp fields to be used originally.