Deleted Added
full compact
779a780
> int rc = 0;
785a787,791
> #ifdef USE_DNSTAP
> if(worker->dtenv.log_client_query_messages)
> dt_msg_send_client_query(&worker->dtenv, &repinfo->addr, c->type,
> c->buffer);
> #endif
789a796,797
> if(ret == 1)
> goto send_reply;
813c821
< return 1;
---
> goto send_reply;
832c840
< return 1;
---
> goto send_reply;
841c849
< return 1;
---
> goto send_reply;
851c859
< *(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
---
> *(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
854c862
< return 1;
---
> goto send_reply;
882c890
< return 1;
---
> goto send_reply;
892c900
< return 1;
---
> goto send_reply;
902c910
< return 1;
---
> goto send_reply;
908a917,918
> if(ret == 1)
> goto send_reply;
926c936
< return 1;
---
> goto send_reply;
928c938
< h = query_info_hash(&qinfo);
---
> h = query_info_hash(&qinfo, sldns_buffer_read_u16_at(c->buffer, 2));
945c955,956
< return 0;
---
> rc = 0;
> goto send_reply_rc;
948c959
< return 1;
---
> goto send_reply;
958c969
< return 1;
---
> goto send_reply;
977c988
< &edns, repinfo, *(uint16_t*)(void *)sldns_buffer_begin(c->buffer));
---
> &edns, repinfo, *(uint16_t*)(void *)sldns_buffer_begin(c->buffer));
979a991,1000
>
> send_reply:
> rc = 1;
> send_reply_rc:
> #ifdef USE_DNSTAP
> if(worker->dtenv.log_client_response_messages)
> dt_msg_send_client_response(&worker->dtenv, &repinfo->addr,
> c->type, c->buffer);
> #endif
> return rc;
985,988c1006,1007
< /* note that log, print, syscalls here give race conditions. */
< /* we still print DETAIL logs, because this is extensive per message
< * logging anyway, and the operator may then have an interest
< * in the cause for unbound to exit */
---
> /* note that log, print, syscalls here give race conditions.
> * And cause hangups if the log-lock is held by the application. */
993d1011
< verbose(VERB_QUERY, "caught signal SIGHUP");
998d1015
< verbose(VERB_QUERY, "caught signal SIGINT");
1004d1020
< verbose(VERB_QUERY, "caught signal SIGQUIT");
1010d1025
< verbose(VERB_QUERY, "caught signal SIGTERM");
1015c1030
< log_err("unknown signal: %d, ignored", sig);
---
> /* unknown signal, ignored */
1092a1108,1115
> #ifdef USE_DNSTAP
> if(daemon->cfg->dnstap) {
> log_assert(daemon->dtenv != NULL);
> memcpy(&worker->dtenv, daemon->dtenv, sizeof(struct dt_env));
> if(!dt_init(&worker->dtenv))
> fatal_exit("dt_init failed");
> }
> #endif
1099a1123,1127
> #ifdef USE_DNSTAP
> struct dt_env* dtenv = &worker->dtenv;
> #else
> void* dtenv = NULL;
> #endif
1148c1176,1177
< worker->daemon->listen_sslctx, worker_handle_request, worker);
---
> worker->daemon->listen_sslctx, dtenv, worker_handle_request,
> worker);
1161c1190,1191
< cfg->do_udp, worker->daemon->connect_sslctx, cfg->delay_close);
---
> cfg->do_udp, worker->daemon->connect_sslctx, cfg->delay_close,
> dtenv);
1296,1297c1326,1327
< struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone,
< size_t zonelen, struct module_qstate* q)
---
> int nocaps, struct sockaddr_storage* addr, socklen_t addrlen,
> uint8_t* zone, size_t zonelen, struct module_qstate* q)
1306c1336
< qnamelen, qtype, qclass, flags, dnssec, want_dnssec,
---
> qnamelen, qtype, qclass, flags, dnssec, want_dnssec, nocaps,
1328a1359
> worker->back->num_tcp_outgoing = 0;
1352c1383
< struct sockaddr_storage* ATTR_UNUSED(addr),
---
> int ATTR_UNUSED(nocaps), struct sockaddr_storage* ATTR_UNUSED(addr),