Lines Matching defs:rep
343 if(must_validate && (msg->rep->security == sec_status_bogus ||
344 msg->rep->security == sec_status_secure_sentinel_fail)) {
347 } else if(msg->rep->security == sec_status_unchecked && must_validate) {
351 } else if(msg->rep->security == sec_status_secure &&
352 !reply_all_rrsets_secure(msg->rep) && must_validate) {
405 struct edns_data* edns, struct comm_reply* rep, uint16_t qid,
415 struct sldns_buffer* r_buffer = rep->c->buffer;
417 if(rep->c->tcp_req_info) {
418 r_buffer = rep->c->tcp_req_info->spool_buffer;
420 if(!infra_wait_limit_allowed(mesh->env->infra_cache, rep,
424 comm_point_drop_reply(rep);
432 if(!mesh_make_new_space(mesh, rep->c->buffer)) {
435 comm_point_drop_reply(rep);
446 comm_point_drop_reply(rep);
461 LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
465 comm_point_send_reply(rep);
480 NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
484 comm_point_send_reply(rep);
506 if(!mesh_state_add_reply(s, edns, rep, qid, qflags, qinfo)) {
510 if(rep->c->tcp_req_info) {
511 if(!tcp_req_info_add_meshstate(rep->c->tcp_req_info, mesh, s)) {
516 if(rep->c->use_h2) {
517 http2_stream_add_meshstate(rep->c->h2_stream, mesh, s);
535 infra_wait_limit_inc(mesh->env->infra_cache, rep, *mesh->env->now,
565 NULL, LDNS_RCODE_SERVFAIL, edns, rep, mesh->env->scratch, mesh->env->now_tv))
569 if(rep->c->use_h2)
570 http2_stream_remove_mesh_state(rep->c->h2_stream);
571 comm_point_send_reply(rep);
970 struct mesh_reply* rep = mstate->reply_list;
976 for(; rep; rep=rep->next) {
978 &rep->query_reply, mesh->env->cfg);
979 if(rep->query_reply.c->use_h2)
980 http2_stream_remove_mesh_state(rep->h2_stream);
981 comm_point_drop_reply(&rep->query_reply);
1209 * @param rep: reply to send (or NULL if rcode is set).
1215 mesh_do_callback(struct mesh_state* m, int rcode, struct reply_info* rep,
1223 if(rep && rep->security == sec_status_secure)
1226 if(!rep && rcode == LDNS_RCODE_NOERROR)
1228 if(!rcode && rep && (rep->security == sec_status_bogus ||
1229 rep->security == sec_status_secure_sentinel_fail)) {
1237 rep, rcode, &r->edns, NULL, m->s.region, start_time))
1240 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
1257 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
1259 !reply_info_answer_encode(&m->s.qinfo, rep, r->qid,
1270 (rep?rep->security:sec_status_unchecked),
1299 struct reply_info* rep, struct mesh_reply* r)
1316 if(rep->reason_bogus != LDNS_EDE_NONE) {
1318 m->s.region, rep->reason_bogus, rep->reason_bogus_str);
1326 * @param rep: reply to send (or NULL if rcode is set).
1333 mesh_send_reply(struct mesh_state* m, int rcode, struct reply_info* rep,
1353 m->s.env->cfg->ignore_cd) && rep &&
1354 (rep->security <= sec_status_bogus ||
1355 rep->security == sec_status_secure_sentinel_fail)) {
1360 if(rep && rep->security == sec_status_secure)
1363 if(!rep && rcode == LDNS_RCODE_NOERROR)
1406 rep, rcode, &r->edns, &r->query_reply, m->s.region, &r->start_time))
1409 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep, rcode,
1415 /* Since we are SERVFAILing here, CD bit and rep->security
1417 if(m->s.env->cfg->ede && rep) {
1418 mesh_find_and_attach_ede_and_reason(m, rep, r);
1437 * Need to explicitly check for rep->security otherwise failed
1439 if(m->s.env->cfg->ede && rep &&
1440 (rep->security <= sec_status_bogus ||
1441 rep->security == sec_status_secure_sentinel_fail)) {
1442 mesh_find_and_attach_ede_and_reason(m, rep, r);
1445 if(!inplace_cb_reply_call(m->s.env, &m->s.qinfo, &m->s, rep,
1447 !reply_info_answer_encode(&m->s.qinfo, rep, r->qid,
1453 rep, LDNS_RCODE_SERVFAIL, &r->edns, &r->query_reply, m->s.region, &r->start_time))
1500 struct reply_info* rep = (mstate->s.return_msg?
1501 mstate->s.return_msg->rep:NULL);
1510 (rep && FLAGS_GET_RCODE(rep->flags) == LDNS_RCODE_SERVFAIL)) {
1582 mesh_send_reply(mstate, mstate->s.return_rcode, rep,
1640 mesh_do_callback(mstate, mstate->s.return_rcode, rep, c, &tv);
1714 struct comm_reply* rep, uint16_t qid, uint16_t qflags,
1721 r->query_reply = *rep;
1740 if(rep->c->use_h2)
1741 r->h2_stream = rep->c->h2_stream;
1993 m->s.curmod, (m->reply_list)?"rep":"", /*hasreply*/
2134 struct respip_action_info* actinfo, struct reply_info* rep,
2143 if(!respip_rewrite_reply(qinfo, cinfo, rep, encode_repp, actinfo,
2151 *encode_repp == rep)
2200 encode_rep = msg->rep;
2206 qstate->client_info, &actinfo, msg->rep, &alias_rrset, &encode_rep,
2210 !respip_merge_cname(partial_rep, &qstate->qinfo, msg->rep,
2247 log_dns_msg("Serve expired lookup", &qstate->qinfo, msg->rep);
2297 mesh_send_reply(mstate, LDNS_RCODE_NOERROR, msg->rep,
2346 mesh_do_callback(mstate, LDNS_RCODE_NOERROR, msg->rep, c, &tv);