Lines Matching refs:repinfo
553 uint16_t id, uint16_t flags, struct comm_reply* repinfo,
598 msg->rep, LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad,
608 error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
638 (int)(flags&LDNS_RCODE_MASK), edns, repinfo, worker->scratchpad,
653 repinfo->c->buffer, 0, 1, worker->scratchpad,
656 LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad,
659 error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
664 server_stats_insrcode(&worker->stats, repinfo->c->buffer);
724 * Normally, the answer message will be built in repinfo->c->buffer; if the
737 struct comm_reply* repinfo, struct edns_data* edns)
802 LDNS_RCODE_SERVFAIL, edns, repinfo, worker->scratchpad,
811 error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
846 &repinfo->client_addr, repinfo->client_addrlen, alias_rrset,
888 (int)(flags&LDNS_RCODE_MASK), edns, repinfo, worker->scratchpad,
892 repinfo->c->buffer, timenow, 1, worker->scratchpad,
896 NULL, NULL, LDNS_RCODE_SERVFAIL, edns, repinfo,
899 error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL,
919 uint16_t flags, struct comm_reply* repinfo, time_t leeway, int noreply,
926 if(repinfo->c->tcp_req_info) {
928 repinfo->c->tcp_req_info->spool_buffer,
929 repinfo->c->buffer);
931 comm_point_send_reply(repinfo);
942 &repinfo->client_addr, opt_list);
962 * @param repinfo: reply information for a communication point.
966 struct worker* worker, struct comm_reply* repinfo)
976 LDNS_RCODE_NOERROR, edns, repinfo, worker->scratchpad,
1017 struct worker* worker, struct comm_reply* repinfo)
1019 chaos_replystr(pkt, (char**)&str, 1, edns, worker, repinfo);
1027 * @param repinfo: reply information for a communication point.
1031 struct comm_reply* repinfo)
1042 chaos_replystr(pkt, NULL, 0, edns, w, repinfo);
1076 chaos_replystr(pkt, str_array, num, edns, w, repinfo);
1085 * @param repinfo: reply information for a communication point.
1091 struct edns_data* edns, struct comm_reply* repinfo, sldns_buffer* pkt)
1107 chaos_replyonestr(pkt, buf, edns, w, repinfo);
1110 chaos_replyonestr(pkt, "no hostname", edns, w, repinfo);
1113 else chaos_replyonestr(pkt, cfg->identity, edns, w, repinfo);
1124 chaos_replyonestr(pkt, PACKAGE_STRING, edns, w, repinfo);
1125 else chaos_replyonestr(pkt, cfg->version, edns, w, repinfo);
1133 chaos_trustanchor(pkt, edns, w, repinfo);
1204 struct worker* worker, struct comm_reply* repinfo,
1210 log_acl_action("dropped", &repinfo->client_addr,
1211 repinfo->client_addrlen, acl, acladdr);
1214 comm_point_drop_reply(repinfo);
1222 log_acl_action("refused", &repinfo->client_addr,
1223 repinfo->client_addrlen, acl, acladdr);
1237 comm_point_drop_reply(repinfo);
1392 struct worker* worker, struct comm_reply* repinfo,
1398 &repinfo->remote_addr, repinfo->remote_addrlen);
1401 &repinfo->client_addr, repinfo->client_addrlen);
1408 return deny_refuse(c, *acl, acl_deny, acl_refuse, worker, repinfo,
1414 struct worker* worker, struct comm_reply* repinfo,
1419 worker, repinfo, acladdr, ede, check_result);
1449 struct comm_reply* repinfo)
1479 if((error != NETEVENT_NOERROR && error != NETEVENT_DONE)|| !repinfo) {
1499 repinfo->max_udp_size = worker->daemon->cfg->max_udp_size;
1500 if(!dnsc_handle_curved_request(worker->daemon->dnscenv, repinfo)) {
1504 if(c->dnscrypt && !repinfo->is_dnscrypted) {
1511 log_addr(VERB_CLIENT,"from",&repinfo->client_addr,
1512 repinfo->client_addrlen);
1513 comm_point_drop_reply(repinfo);
1519 log_addr(VERB_CLIENT, "from", &repinfo->client_addr,
1520 repinfo->client_addrlen);
1521 comm_point_drop_reply(repinfo);
1533 comm_point_drop_reply(repinfo);
1539 } else if(c->dnscrypt && repinfo->is_dnscrypted) {
1548 log_addr(VERB_ALGO, "request from client", &repinfo->client_addr, repinfo->client_addrlen);
1549 log_addr(VERB_ALGO, "to local addr", (void*)repinfo->c->socket->addr, repinfo->c->socket->addrlen);
1550 dt_msg_send_client_query(&worker->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr, c->type, c->ssl, c->buffer,
1555 if(repinfo->is_proxied) {
1556 if((ret=deny_refuse_all(c, &acl, worker, repinfo, &acladdr,
1563 if((ret=deny_refuse_all(c, &acl, worker, repinfo, &acladdr,
1573 log_addr(VERB_CLIENT,"from",&repinfo->client_addr, repinfo->client_addrlen);
1580 comm_point_drop_reply(repinfo);
1592 /* NOTE: we always check the repinfo->client_address.
1594 if(!check_ip_ratelimit(worker, &repinfo->client_addr,
1595 repinfo->client_addrlen, 0, c->buffer)) {
1597 comm_point_drop_reply(repinfo);
1604 log_addr(VERB_CLIENT, "from", &repinfo->client_addr,
1605 repinfo->client_addrlen);
1608 comm_point_drop_reply(repinfo);
1619 addr_to_str(&repinfo->client_addr, repinfo->client_addrlen, ip, sizeof(ip));
1625 log_addr(VERB_CLIENT, "from", &repinfo->client_addr,
1626 repinfo->client_addrlen);
1643 log_addr(VERB_CLIENT, "from", &repinfo->client_addr,
1644 repinfo->client_addrlen);
1646 comm_point_drop_reply(repinfo);
1659 c->buffer, &edns, worker->env.cfg, c, repinfo,
1665 log_addr(VERB_CLIENT, "from", &repinfo->client_addr,
1666 repinfo->client_addrlen);
1681 log_addr(VERB_CLIENT, "from", &repinfo->client_addr,
1682 repinfo->client_addrlen);
1693 log_addr(VERB_CLIENT, "from", &repinfo->client_addr,
1694 repinfo->client_addrlen);
1704 /* NOTE: we always check the repinfo->client_address.
1706 if(!check_ip_ratelimit(worker, &repinfo->client_addr,
1707 repinfo->client_addrlen, edns.cookie_valid,
1710 comm_point_drop_reply(repinfo);
1739 log_addr(VERB_ALGO, "from",&repinfo->remote_addr
1740 , repinfo->remote_addrlen);
1759 log_addr(VERB_CLIENT, "from", &repinfo->client_addr,
1760 repinfo->client_addrlen);
1765 log_addr(VERB_CLIENT, "from", &repinfo->client_addr,
1766 repinfo->client_addrlen);
1780 qinfo.qclass, &edns, repinfo);
1784 &edns, repinfo, c->buffer)) {
1791 &repinfo->client_addr, repinfo->client_addrlen);
1796 &edns, c->buffer, worker->scratchpad, repinfo, acladdr->taglist,
1803 comm_point_drop_reply(repinfo);
1811 repinfo, acladdr->taglist, acladdr->taglen, &worker->stats,
1815 comm_point_drop_reply(repinfo);
1822 &qinfo, &edns, repinfo, c->buffer, worker->scratchpad)) {
1825 comm_point_drop_reply(repinfo);
1838 if((ret=deny_refuse_non_local(c, acl, worker, repinfo, acladdr,
1867 &repinfo->client_addr, repinfo->client_addrlen);
1930 sldns_buffer_read_u16_at(c->buffer, 2), repinfo,
1948 repinfo, leeway,
1992 sldns_buffer_read_u16_at(c->buffer, 2), repinfo,
2007 &repinfo->client_addr, repinfo->client_addrlen);
2009 &repinfo->client_addr, repinfo->client_addrlen);
2015 &edns, repinfo, *(uint16_t*)(void *)sldns_buffer_begin(c->buffer),
2025 comm_point_drop_reply(repinfo);
2040 log_addr(VERB_ALGO, "from local addr", (void*)repinfo->c->socket->addr, repinfo->c->socket->addrlen);
2041 log_addr(VERB_ALGO, "response to client", &repinfo->client_addr, repinfo->client_addrlen);
2042 dt_msg_send_client_response(&worker->dtenv, &repinfo->client_addr, (void*)repinfo->c->socket->addr, c->type, c->ssl, c->buffer);
2055 &repinfo->client_addr, repinfo->client_addrlen,
2057 (worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr:NULL),
2061 &repinfo->client_addr, repinfo->client_addrlen,
2063 (worker->env.cfg->log_destaddr?(void*)repinfo->c->socket->addr:NULL),
2068 if(!dnsc_handle_uncurved_request(repinfo)) {