Lines Matching defs:rep

345 	if(must_validate && (msg->rep->security == sec_status_bogus ||
346 msg->rep->security == sec_status_secure_sentinel_fail)) {
349 } else if(msg->rep->security == sec_status_unchecked && must_validate) {
353 } else if(msg->rep->security == sec_status_secure &&
354 !reply_all_rrsets_secure(msg->rep) && must_validate) {
407 struct edns_data* edns, struct comm_reply* rep, uint16_t qid,
417 struct sldns_buffer* r_buffer = rep->c->buffer;
419 if(rep->c->tcp_req_info) {
420 r_buffer = rep->c->tcp_req_info->spool_buffer;
422 if(!infra_wait_limit_allowed(mesh->env->infra_cache, rep,
426 comm_point_drop_reply(rep);
434 if(!mesh_make_new_space(mesh, rep->c->buffer)) {
437 comm_point_drop_reply(rep);
448 comm_point_drop_reply(rep);
463 LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
467 comm_point_send_reply(rep);
482 NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
486 comm_point_send_reply(rep);
508 if(!mesh_state_add_reply(s, edns, rep, qid, qflags, qinfo)) {
512 if(rep->c->tcp_req_info) {
513 if(!tcp_req_info_add_meshstate(rep->c->tcp_req_info, mesh, s)) {
518 if(rep->c->use_h2) {
519 http2_stream_add_meshstate(rep->c->h2_stream, mesh, s);
537 infra_wait_limit_inc(mesh->env->infra_cache, rep, *mesh->env->now,
567 NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
571 if(rep->c->use_h2)
572 http2_stream_remove_mesh_state(rep->c->h2_stream);
573 comm_point_send_reply(rep);
972 struct mesh_reply* rep = mstate->reply_list;
978 for(; rep; rep=rep->next) {
980 &rep->query_reply, mesh->env->cfg);
981 if(rep->query_reply.c->use_h2)
982 http2_stream_remove_mesh_state(rep->h2_stream);
983 comm_point_drop_reply(&rep->query_reply);
1211 * @param rep: reply to send (or NULL if rcode is set).
1217 mesh_do_callback(struct mesh_state* m, int rcode, struct reply_info* rep,
1225 if(rep && rep->security == sec_status_secure)
1228 if(!rep && rcode == LDNS_RCODE_NOERROR)
1230 if(!rcode && rep && (rep->security == sec_status_bogus ||
1231 rep->security == sec_status_secure_sentinel_fail)) {
1239 rep, rcode, &r->edns, NULL, m->s.region, start_time))
1242 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
1259 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
1261 !reply_info_answer_encode(&m->s.qinfo, rep, r->qid,
1272 (rep?rep->security:sec_status_unchecked),
1301 struct reply_info* rep, struct mesh_reply* r)
1318 if(rep->reason_bogus != LDNS_EDE_NONE) {
1320 m->s.region, rep->reason_bogus, rep->reason_bogus_str);
1328 * @param rep: reply to send (or NULL if rcode is set).
1335 mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep,
1355 m->s.env->cfg->ignore_cd) && rep &&
1356 (rep->security <= sec_status_bogus ||
1357 rep->security == sec_status_secure_sentinel_fail)) {
1362 if(rep && rep->security == sec_status_secure)
1365 if(!rep && rcode == LDNS_RCODE_NOERROR)
1408 rep, rcode, &r->edns, &r->query_reply, m->s.region, &r->start_time))
1411 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
1417 /* Since we are SERVFAILing here, CD bit and rep->security
1419 if(m->s.env->cfg->ede && rep) {
1420 mesh_find_and_attach_ede_and_reason(m, rep, r);
1439 * Need to explicitly check for rep->security otherwise failed
1441 if(m->s.env->cfg->ede && rep &&
1442 (rep->security <= sec_status_bogus ||
1443 rep->security == sec_status_secure_sentinel_fail)) {
1444 mesh_find_and_attach_ede_and_reason(m, rep, r);
1447 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
1449 !reply_info_answer_encode(&m->s.qinfo, rep, r->qid,
1455 rep, LDNS_RCODE_SERVFAIL, &r->edns, &r->query_reply, m->s.region, &r->start_time))
1502 struct reply_info* rep = (mstate->s.return_msg?
1503 mstate->s.return_msg->rep:NULL);
1512 (rep && FLAGS_GET_RCODE(rep->flags) == LDNS_RCODE_SERVFAIL)) {
1584 mesh_send_reply(mstate, mstate->s.return_rcode, rep,
1642 mesh_do_callback(mstate, mstate->s.return_rcode, rep, c, &tv);
1716 struct comm_reply* rep, uint16_t qid, uint16_t qflags,
1723 r->query_reply = *rep;
1742 if(rep->c->use_h2)
1743 r->h2_stream = rep->c->h2_stream;
1995 m->s.curmod, (m->reply_list)?"rep":"", /*hasreply*/
2136 struct respip_action_info* actinfo, struct reply_info* rep,
2145 if(!respip_rewrite_reply(qinfo, cinfo, rep, encode_repp, actinfo,
2153 *encode_repp == rep)
2203 encode_rep = msg->rep;
2209 qstate->client_info, &actinfo, msg->rep, &alias_rrset, &encode_rep,
2213 !respip_merge_cname(partial_rep, &qstate->qinfo, msg->rep,
2250 log_dns_msg("Serve expired lookup", &qstate->qinfo, msg->rep);
2302 mesh_send_reply(mstate, LDNS_RCODE_NOERROR, msg->rep,
2351 mesh_do_callback(mstate, LDNS_RCODE_NOERROR, msg->rep, c, &tv);