From fb355e4200fcf98f36a4f3e1fbeb1e16b4761ee6 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 13 Sep 2024 09:38:07 +0000 Subject: Push what I have for now Signed-off-by: Laurent Bercot --- src/cache/query.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cache') diff --git a/src/cache/query.c b/src/cache/query.c index 7fa5af3..4832340 100644 --- a/src/cache/query.c +++ b/src/cache/query.c @@ -47,12 +47,12 @@ uint16_t query_event (uint16_t qid) default : rcode = 2 ; break ; } s6dns_engine_query(&q->dt, &question.s, &question.len, &qtype) ; - r = dcache_searchnode_g(&g->dcache, &nodeid, question.s, question.len, qtype) ; + r = dcache_search_g(&g->dcache, &nodeid, question.s, question.len, qtype) ; switch (r) { case -1 : log_warn_unexpected_answer(question.s, question.len, qtype, 0) ; - if (!rcode) dcache_add_new_answer(&g->dcache, question.s, question.len, qtype, s6dns_engine_packet(&q->dt), s6dns_engine_packetlen(&q->dt)) ; + if (!rcode) dcache_add_g(&g->dcache, question.s, question.len, qtype, s6dns_engine_packet(&q->dt), s6dns_engine_packetlen(&q->dt), &expire) ; break ; case 1 : log_warn_unexpected_answer(question.s, question.len, qtype, 1) ; -- cgit v1.3.1