mirror of
https://github.com/mollyim/unbound.git
synced 2025-05-12 21:30:35 +01:00
- For #391: fix indentation.
This commit is contained in:
parent
3e03e2c26d
commit
ee2545d939
7 changed files with 18 additions and 17 deletions
|
@ -546,7 +546,7 @@ answer_norec_from_cache(struct worker* worker, struct query_info* qinfo,
|
|||
edns->bits &= EDNS_DO;
|
||||
if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, msg->rep,
|
||||
(int)(flags&LDNS_RCODE_MASK), edns, repinfo, worker->scratchpad,
|
||||
worker->env.now_tv))
|
||||
worker->env.now_tv))
|
||||
return 0;
|
||||
msg->rep->flags |= BIT_QR|BIT_RA;
|
||||
if(!apply_edns_options(edns, &edns_bak, worker->env.cfg,
|
||||
|
@ -688,7 +688,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
|
|||
edns->bits &= EDNS_DO;
|
||||
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, rep,
|
||||
LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad,
|
||||
worker->env.now_tv))
|
||||
worker->env.now_tv))
|
||||
goto bail_out;
|
||||
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
|
||||
qinfo, id, flags, edns);
|
||||
|
@ -760,7 +760,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
|
|||
udpsize, edns, (int)(edns->bits & EDNS_DO), *is_secure_answer)) {
|
||||
if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, NULL,
|
||||
LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad,
|
||||
worker->env.now_tv))
|
||||
worker->env.now_tv))
|
||||
edns->opt_list = NULL;
|
||||
error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
|
||||
qinfo, id, flags, edns);
|
||||
|
@ -849,7 +849,7 @@ chaos_replystr(sldns_buffer* pkt, char** str, int num, struct edns_data* edns,
|
|||
edns->bits &= EDNS_DO;
|
||||
if(!inplace_cb_reply_local_call(&worker->env, NULL, NULL, NULL,
|
||||
LDNS_RCODE_NOERROR, edns, repinfo, worker->scratchpad,
|
||||
worker->env.now_tv))
|
||||
worker->env.now_tv))
|
||||
edns->opt_list = NULL;
|
||||
if(sldns_buffer_capacity(pkt) >=
|
||||
sldns_buffer_limit(pkt)+calc_edns_field_size(edns))
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
- Merge PR #391 from fhriley: Add start_time to reply callbacks so
|
||||
modules can compute the response time.
|
||||
- For #391: use struct timeval* start_time for callback information.
|
||||
- For #391: fix indentation.
|
||||
|
||||
6 January 2021: Wouter
|
||||
- Fix #379: zone loading over HTTP appears to have buffer issues.
|
||||
|
|
|
@ -73,7 +73,7 @@ int python_inplace_cb_reply_generic(struct query_info* qinfo,
|
|||
struct module_qstate* qstate, struct reply_info* rep, int rcode,
|
||||
struct edns_data* edns, struct edns_option** opt_list_out,
|
||||
struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time, int id, void* python_callback);
|
||||
struct timeval* start_time, int id, void* python_callback);
|
||||
|
||||
/** Declared here for fptr_wlist access. The definition is in interface.i. */
|
||||
int python_inplace_cb_query_generic(
|
||||
|
|
|
@ -1350,7 +1350,7 @@ void mesh_query_done(struct mesh_state* mstate)
|
|||
}
|
||||
}
|
||||
for(r = mstate->reply_list; r; r = r->next) {
|
||||
tv = r->start_time;
|
||||
tv = r->start_time;
|
||||
|
||||
/* if a response-ip address block has been stored the
|
||||
* information should be logged for each client. */
|
||||
|
@ -1992,7 +1992,7 @@ mesh_serve_expired_callback(void* arg)
|
|||
log_dns_msg("Serve expired lookup", &qstate->qinfo, msg->rep);
|
||||
|
||||
for(r = mstate->reply_list; r; r = r->next) {
|
||||
tv = r->start_time;
|
||||
tv = r->start_time;
|
||||
|
||||
/* If address info is returned, it means the action should be an
|
||||
* 'inform' variant and the information should be logged. */
|
||||
|
|
|
@ -1036,7 +1036,7 @@ static int inplace_cb_reply_call_generic(
|
|||
struct query_info* qinfo, struct module_qstate* qstate,
|
||||
struct reply_info* rep, int rcode, struct edns_data* edns,
|
||||
struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time)
|
||||
struct timeval* start_time)
|
||||
{
|
||||
struct inplace_cb* cb;
|
||||
struct edns_option* opt_list_out = NULL;
|
||||
|
@ -1058,7 +1058,7 @@ static int inplace_cb_reply_call_generic(
|
|||
int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
|
||||
struct module_qstate* qstate, struct reply_info* rep, int rcode,
|
||||
struct edns_data* edns, struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time)
|
||||
struct timeval* start_time)
|
||||
{
|
||||
return inplace_cb_reply_call_generic(
|
||||
env->inplace_cb_lists[inplace_cb_reply], inplace_cb_reply, qinfo,
|
||||
|
@ -1069,7 +1069,7 @@ int inplace_cb_reply_cache_call(struct module_env* env,
|
|||
struct query_info* qinfo, struct module_qstate* qstate,
|
||||
struct reply_info* rep, int rcode, struct edns_data* edns,
|
||||
struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time)
|
||||
struct timeval* start_time)
|
||||
{
|
||||
return inplace_cb_reply_call_generic(
|
||||
env->inplace_cb_lists[inplace_cb_reply_cache], inplace_cb_reply_cache,
|
||||
|
@ -1080,7 +1080,7 @@ int inplace_cb_reply_local_call(struct module_env* env,
|
|||
struct query_info* qinfo, struct module_qstate* qstate,
|
||||
struct reply_info* rep, int rcode, struct edns_data* edns,
|
||||
struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time)
|
||||
struct timeval* start_time)
|
||||
{
|
||||
return inplace_cb_reply_call_generic(
|
||||
env->inplace_cb_lists[inplace_cb_reply_local], inplace_cb_reply_local,
|
||||
|
@ -1091,7 +1091,7 @@ int inplace_cb_reply_servfail_call(struct module_env* env,
|
|||
struct query_info* qinfo, struct module_qstate* qstate,
|
||||
struct reply_info* rep, int rcode, struct edns_data* edns,
|
||||
struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time)
|
||||
struct timeval* start_time)
|
||||
{
|
||||
/* We are going to servfail. Remove any potential edns options. */
|
||||
if(qstate)
|
||||
|
|
|
@ -559,7 +559,7 @@ struct edns_option* edns_opt_list_find(struct edns_option* list, uint16_t code);
|
|||
int inplace_cb_reply_call(struct module_env* env, struct query_info* qinfo,
|
||||
struct module_qstate* qstate, struct reply_info* rep, int rcode,
|
||||
struct edns_data* edns, struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time);
|
||||
struct timeval* start_time);
|
||||
|
||||
/**
|
||||
* Call the registered functions in the inplace_cb_reply_cache linked list.
|
||||
|
@ -578,7 +578,7 @@ int inplace_cb_reply_cache_call(struct module_env* env,
|
|||
struct query_info* qinfo, struct module_qstate* qstate,
|
||||
struct reply_info* rep, int rcode, struct edns_data* edns,
|
||||
struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time);
|
||||
struct timeval* start_time);
|
||||
|
||||
/**
|
||||
* Call the registered functions in the inplace_cb_reply_local linked list.
|
||||
|
@ -597,7 +597,7 @@ int inplace_cb_reply_local_call(struct module_env* env,
|
|||
struct query_info* qinfo, struct module_qstate* qstate,
|
||||
struct reply_info* rep, int rcode, struct edns_data* edns,
|
||||
struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time);
|
||||
struct timeval* start_time);
|
||||
|
||||
/**
|
||||
* Call the registered functions in the inplace_cb_reply linked list.
|
||||
|
@ -617,7 +617,7 @@ int inplace_cb_reply_servfail_call(struct module_env* env,
|
|||
struct query_info* qinfo, struct module_qstate* qstate,
|
||||
struct reply_info* rep, int rcode, struct edns_data* edns,
|
||||
struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time);
|
||||
struct timeval* start_time);
|
||||
|
||||
/**
|
||||
* Call the registered functions in the inplace_cb_query linked list.
|
||||
|
|
|
@ -258,7 +258,7 @@ typedef int inplace_cb_reply_func_type(struct query_info* qinfo,
|
|||
struct module_qstate* qstate, struct reply_info* rep, int rcode,
|
||||
struct edns_data* edns, struct edns_option** opt_list_out,
|
||||
struct comm_reply* repinfo, struct regional* region,
|
||||
struct timeval* start_time, int id, void* callback);
|
||||
struct timeval* start_time, int id, void* callback);
|
||||
|
||||
/**
|
||||
* Inplace callback function called before sending the query to a nameserver.
|
||||
|
|
Loading…
Reference in a new issue