From 5c293d1139b0a730c7193ff956b59eb3fc109fb7 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 28 Jun 2019 16:08:18 +0200 Subject: [PATCH] auth: Fix the accounting of servfail-queries in the distributor This was broken since eb029b8efe0217b39c5cf34235b565b4c8d6e95e which introduced a specific type of DNSName,qtype ring. --- pdns/distributor.hh | 8 ++++---- pdns/test-distributor_hh.cc | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pdns/distributor.hh b/pdns/distributor.hh index ecc1509cd..6f99c62a6 100644 --- a/pdns/distributor.hh +++ b/pdns/distributor.hh @@ -222,7 +222,7 @@ retry: a->setRcode(RCode::ServFail); S.inc("servfail-packets"); - S.ringAccount("servfail-queries",QD->Q->qdomain.toLogString()); + S.ringAccount("servfail-queries", QD->Q->qdomain, QD->Q->qtype); delete QD->Q; } else { @@ -239,7 +239,7 @@ retry: a->setRcode(RCode::ServFail); S.inc("servfail-packets"); - S.ringAccount("servfail-queries",QD->Q->qdomain.toLogString()); + S.ringAccount("servfail-queries", QD->Q->qdomain, QD->Q->qtype); delete QD->Q; } else { @@ -286,7 +286,7 @@ retry: a->setRcode(RCode::ServFail); S.inc("servfail-packets"); - S.ringAccount("servfail-queries",q->qdomain.toLogString()); + S.ringAccount("servfail-queries", q->qdomain, q->qtype); } else { g_log<setRcode(RCode::ServFail); S.inc("servfail-packets"); - S.ringAccount("servfail-queries",q->qdomain.toLogString()); + S.ringAccount("servfail-queries", q->qdomain, q->qtype); } else { g_log<d_dt.set(); q->qdomain=DNSName(std::to_string(n)); + q->qtype = QType(QType::A); d->question(q, report2); } -- 2.40.0