From 8441e20e9547b1caaccf5831b3c666f8f824d40e Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 21 Oct 2022 11:07:20 +0200 Subject: [PATCH] dnsdist: Fix comparison of DNS serials --- pdns/dnsdistdist/dnsdist-tcp-downstream.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/dnsdist-tcp-downstream.cc b/pdns/dnsdistdist/dnsdist-tcp-downstream.cc index efe997f33d..96758efafe 100644 --- a/pdns/dnsdistdist/dnsdist-tcp-downstream.cc +++ b/pdns/dnsdistdist/dnsdist-tcp-downstream.cc @@ -803,7 +803,7 @@ bool TCPConnectionToBackend::isXFRFinished(const TCPResponse& response, TCPQuery if (query.d_xfrMasterSerial == 0) { // store the first SOA in our client's connection metadata query.d_xfrMasterSerial = serial; - if (query.d_idstate.qtype == QType::IXFR && query.d_xfrMasterSerial <= query.d_ixfrQuerySerial) { + if (query.d_idstate.qtype == QType::IXFR && (query.d_xfrMasterSerial == query.d_ixfrQuerySerial || rfc1982LessThan(query.d_xfrMasterSerial, query.d_ixfrQuerySerial))) { /* This is the first message with a master SOA: RFC 1995 Section 2: If an IXFR query with the same or newer version number -- 2.47.2