mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-08 07:49:35 -05:00
Fix uncached CLIENT_RESPONSE'es on stateful transports
Because repinfo->c->buffer does not contain the response when the it did not came from cache. Only after tcp_req_info_send_reply is called, is the response on the buffer which is used to fill the dnstap protobuf's.
This commit is contained in:
parent
65e7be5190
commit
9d9eee8402
1 changed files with 6 additions and 6 deletions
|
|
@ -3153,18 +3153,18 @@ comm_point_send_reply(struct comm_reply *repinfo)
|
|||
&repinfo->addr, repinfo->c->type, repinfo->c->buffer);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef USE_DNSTAP
|
||||
if(repinfo->c->tcp_parent->dtenv != NULL &&
|
||||
repinfo->c->tcp_parent->dtenv->log_client_response_messages)
|
||||
dt_msg_send_client_response(repinfo->c->tcp_parent->dtenv,
|
||||
&repinfo->addr, repinfo->c->type, repinfo->c->buffer);
|
||||
#endif
|
||||
if(repinfo->c->tcp_req_info) {
|
||||
tcp_req_info_send_reply(repinfo->c->tcp_req_info);
|
||||
} else {
|
||||
comm_point_start_listening(repinfo->c, -1,
|
||||
repinfo->c->tcp_timeout_msec);
|
||||
}
|
||||
#ifdef USE_DNSTAP
|
||||
if(repinfo->c->tcp_parent->dtenv != NULL &&
|
||||
repinfo->c->tcp_parent->dtenv->log_client_response_messages)
|
||||
dt_msg_send_client_response(repinfo->c->tcp_parent->dtenv,
|
||||
&repinfo->addr, repinfo->c->type, repinfo->c->buffer);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue